Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(portal): do not overwrite portal config file during upgrade
How to test the fix: Using the terraform code from PR #24: * build local RPMs for two versions: ---- cd apim/4.x/ mkdir -p rpms/4.{3.1,4.3} ./build.sh -v 4.3.1 rm graviteeio-apim-4x-4.3.1-1.noarch.rpm mv *.rpm rpms/4.3.1/ ./build.sh -v 4.4.3 rm graviteeio-apim-4x-4.4.3-1.noarch.rpm mv *.rpm rpms/4.4.3/ ---- * then run a redhat 9 VM in Azure: ---- cd ../../test/terraform_linux_vm/redhat export TF_VAR_allowed_ips="$(curl -s 'https://ipv4.seeip.org')" export TF_VAR_username=graviteeio terraform apply -auto-approve ---- * copy your local RPMs to the remote machine following connexion instruction as output from terraform ---- scp ... -r ../../../apim/4.x/rpms graviteeio@<VM ip>:. ---- * connect to the VM with ssh following instruction from terraform output and get into current tmux session ---- ssh .... graviteeio@<VM ip> tmux attach ---- * install first version of built RPMs: ---- ./install_redhat_graviteeio.sh install_graviteeio_from_local_rpms rpms/4.3.1/ ---- * check that APIM works as expected: ** from the remote machine via ./install_redhat_graviteeio.sh test_graviteeio ** by using SSH tunnet from your browser in http://localhost:8084/ for the console (user/pass == admin/admin) and to the portal with http://localhost:8085/ * do the upgrade in VM: ---- for rpm in rpms/4.4.3/*.rpm; do sudo yum upgrade -y "${rpm}"; done sudo systemctl daemon-reload sudo systemctl restart graviteeio-apim-gateway graviteeio-apim-rest-api sleep 45 #wait backend start sudo systemctl restart nginx ---- * check again that console and portal continue to work as expected. Note, the reproduce the issue, rather than local RPM install, do: ---- ./install_redhat_graviteeio.sh install_graviteeio_from_repository 4.3.1 ---- check all good and then: ---- sudo yum upgrade -y "graviteeio-apim-4x-4.4.3" sudo systemctl daemon-reload sudo systemctl restart graviteeio-apim-gateway graviteeio-apim-rest-api sleep 45 #wait backend start sudo systemctl restart nginx ---- Now console still works, but portal is broken. TT-4996 APIM-6148
- Loading branch information