|
@@ -14,69 +14,6 @@ salt 'customer-portal*' cmd.run 'docker restart portal nginx'
|
|
|
|
|
|
Verify Vault service is running. Logs are sent to Splunk. See Splunk search below in this document.
|
|
|
|
|
|
-## Deploy Process
|
|
|
-
|
|
|
-For PROD: Stop docker containers on both servers, but upgrade the containers one server at a time. This way you can quickly get the site back up on the previous server.
|
|
|
-
|
|
|
-One at a time to reduce risk.
|
|
|
-```
|
|
|
-#Stop both
|
|
|
-salt 'customer-portal*' test.ping
|
|
|
-salt 'customer-portal*' cmd.run 'docker container ls'
|
|
|
-salt 'customer-portal*' cmd.run 'docker stop portal nginx'
|
|
|
-
|
|
|
-#Update First Portal Server
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1a' test.ping
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1a' cmd.run 'docker rm portal nginx'
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1a' cmd.run 'docker images'
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1a' cmd.run 'docker rmi <image-ids>'
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1a' state.sls docker.portal --output-diff
|
|
|
-
|
|
|
-#Update Second Portal Server
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1b' test.ping
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1b' cmd.run 'docker rm portal nginx'
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1b' cmd.run 'docker images'
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1b' cmd.run 'docker rmi <image-ids>'
|
|
|
-salt -C 'customer* and G@ec2:availability_zone:us-gov-east-1b' state.sls docker.portal --output-diff
|
|
|
-```
|
|
|
-
|
|
|
-For TEST: Both at the same time
|
|
|
-```
|
|
|
-salt 'customer-portal*' test.ping
|
|
|
-salt 'customer-portal*' cmd.run 'docker container ls'
|
|
|
-salt 'customer-portal*' cmd.run 'docker stop portal nginx'
|
|
|
-salt 'customer-portal*' cmd.run 'docker rm portal nginx'
|
|
|
-salt 'customer-portal*' cmd.run 'docker images'
|
|
|
-salt 'customer-portal*' cmd.run 'docker rmi <image-ids>'
|
|
|
-salt 'customer-portal*' state.sls docker.portal --output-diff
|
|
|
-```
|
|
|
-
|
|
|
-To verify the version, login to Portal and go to the Staff Tools.
|
|
|
-
|
|
|
-From the [XDR Wiki page](https://github.xdr.accenturefederalcyber.com/MDR-Content/mdr-content/wiki/Customer-Portal)
|
|
|
-Last time we tried the `ec2_tags` grain targeting did not work.
|
|
|
-
|
|
|
-```
|
|
|
-salt -G 'ec2_tags:Name:customer-portal' cmd.run "docker images" – You will need to grab the docker image ID for the container that needs to be updated
|
|
|
-salt -G 'ec2_tags:Name:customer-portal' cmd.run "docker stop portal"
|
|
|
-salt -G 'ec2_tags:Name:customer-portal' cmd.run "docker rm portal"
|
|
|
-salt -G 'ec2_tags:Name:customer-portal' cmd.run "docker rmi ${image id from above}
|
|
|
-salt -G 'ec2_tags:Name:customer-portal' state.sls docker
|
|
|
-salt -G 'ec2_tags:Name:customer-portal' state.sls docker.portal
|
|
|
-```
|
|
|
-
|
|
|
-### Deploy specific tag to nginx and/or portal
|
|
|
-
|
|
|
-```
|
|
|
-#login to ECR using the docker salt state
|
|
|
-salt 'customer-portal*' state.sls docker.portal --output-diff test=true
|
|
|
-
|
|
|
-#create a new branch and modify the file to the needed tags then push it up.
|
|
|
-salt 'customer-portal*' state.sls docker.portal-revert saltenv=feature/bp_na_salt_portal_tag
|
|
|
-
|
|
|
-#once you are done delete the branch
|
|
|
-```
|
|
|
-
|
|
|
## Command line access
|
|
|
```
|
|
|
docker exec -ti nginx bash
|
|
@@ -162,6 +99,8 @@ User.objects.filter(email="richard.t.page@accenturefederal.com").delete()
|
|
|
User.objects.filter(email="wesley.a.leonard@accenturefederal.com").delete()
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
## Troubleshooting the docker image
|
|
|
|
|
|
|