# Sensu Upgrade 5.21 -> 6.3 Notes

### Places where code might need to be upgraded for a new version 
- Official Sensu Go Repo [Github](https://github.com/sensu/sensu-go)
- Official Sensu Go Website [Sensu Go]()
- Official Sensu Hosted Package Repo Service [Packagecloud](https://packagecloud.io/sensu/stable/)

- ** We will use our XDR Internal `Reposerver` for all upgrade methods - See [How to add a new package to the Reposerver](Reposerver%20Notes.md)


### Sensu Go Upgrade to 6.3
[Sensu Upgrade Documentation](https://docs.sensu.io/sensu-go/latest/operations/maintain-sensu/upgrade/) - as of June 17, 2021, `Sensu Go 6.3` is not being displayed in the Sensu documentation, but procedure still applies.

1. Download latest packages for `Sensu backend`, `Sensu agents`, `Sensuctl` (Sensu CLI) to `Repo server` and run `yum clean all` on `Sensu Backend` server - See [Reposerver](Reposerver%20Notes.md) notes.

2. If needed, update Salt states to ensure they are up-to-date 
3. Stop Sensu services on `Sensu Backend` server
    ```
    systemctl stop sensu-agent 
    systemctl stop sensu-backend
    ```

4. Update Sensu Go software on the `Sensu Backend` server
   ```
   yum update sensu-go-backend
   yum update sensu-go-cli
   yum update sensu-go-agent
   systemctl daemon-reload
   ```
5. Restart the sensu services 
    ```
    systemctl start sensu-backend
    systemctl start sensu-agent
    ```
6. Run `yum clean all` on Salt minions
7. Stop agent on minion `systemctl stop sensu-agent`
8. Upgrade agent on minion `yum update sensu-go-agent -y`
9. Run this `systemctl daemon-reload`
10. Start agent `systemctl start sensu-agent`
11. Verify with this: 
    ```
    salt '*' cmd.run 'sensu-agent version'
    salt -C '* not salt* not sensu* not jira*' cmd.run 'sensu-agent version'
    ```

In `version 5.16` the default password was removed in favor of a sensu-backend init with bash variables. 

Sen$uP@ssw0rd!

```
systemctl start sensu-backend
export SENSU_BACKEND_CLUSTER_ADMIN_USERNAME=YOUR_USERNAME
export SENSU_BACKEND_CLUSTER_ADMIN_PASSWORD=YOUR_PASSWORD
sensu-backend init
sensuctl create --file filename.json
```