Articles in this section

How to update CR node in SolusVM2 manually ?

Applicable to:

  • SolusVM 2

Question

How to update CR node in SolusVM2 manually ?

Answer

Method 1:

  1. Access master node via SSH
  2. Access solus_api docker container:
    # docker exec -it $(docker container ps --quiet --filter='name=solus_api') /bin/sh
  3. Backup file api/v1/ComputeResource/Commands/UpgradeComputeResource.php
  4. Replace it with RAW file from here
    https://git.plesk.ru/projects/SOLUS/repos/solusnxt/browse/backend/api/v1/ComputeResource/Commands/UpgradeComputeResource.php
  5. In the replaced file remove the following lines:
    CONFIG_TEXT: if (!App::isProduction() || !$this->isApiAlive()) {
    return; }
  6. Run from inside of the container:# php artisan computeResource:upgrade
  7. Trace agent.log on CR nodes to find error, if there are any
  8. Revert original file back api/v1/ComputeResource/Commands/UpgradeComputeResource.php when CR is updated

For failed updates on one specific CR:

1. Backed up existing /usr/local/solus/bin/agent and /etc/solus/agent.json:

# cp -a /etc/solus/agent.json /root
# cp -a /usr/local/solus/bin/agent /root

2. Stopped solus-agent on CR:

# systemctl stop solus-agent

3. Downloaded new agent from Master server:

# wget https://cloud.binaryracks.co.uk:443/api/v1/storage/agent.x86_64

4. Replaced the old agent with the downloaded one:

# mv agent.x86_64 /usr/local/solus/bin/agent
# chmod +x /usr/local/solus/bin/agent

5. Started solus-agent:

# systemctl start solus-agent

6. In SolusVM 2 > Tasks restarted one of the failed update tasks.

Method 2:

1. Restart SolusVM2 service: How to restart SolusVM 2 services? – Solus

2. Access API container:

# docker exec -it $(docker container ps --quiet --filter='name=solus_api') /bin/sh

3. Execute in the container

# php artisan computeResource:upgrade

4. Type exit for exit the container

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.