-
Notifications
You must be signed in to change notification settings - Fork 0
Process: Testing Dock AMI
Herein lie the steps to test new dock AMIs
The first thing you must inorder to test a new AMI is to create one.
- create a new server in EC2 from base ubuntu image
- run the
docks.ymlansible role with like so `ansible-playbook -i -hosts docks.yml -e dock:
After you have created the ami you must create a launch config
- visit EC2 "Launch Configurations" page
- select the latest launch config for your env and right-click and select copy launch configuration
- change the AMI to the one you build above
- ensure you have 1 ebs volume mounted at
/dev/sdb - ensure you have
<env>-docksecurity group attached
After you have created your Launch Config, you now need to use it. If you do not have a org to test with, you will first need to whitelist a org you plan to test with. (ask someone if you do not know how to do this). Once you have a test org you need to update the LC of your test org to use your newly created Launch Configuration.
- Run
docks asg lc -e <env> <orgId> <Launch Configuration ID> - to ensure you this worked wait
1 minutethen rundocks asg list -e <env> | grep <orgId> - If it did not update, look at shiva logs and file a bug, then change the autoscale group to point to your new
Launch Configurationusing AWS
After you have setup your auto scaling group you need to spin up your dock. You can do so by scaling up your Auto Scaling Group by 1
- run
docks asg list -e <env> | grep <orgId>, and note down your current cluster size - run
docks asg scale-out <orgId> 1 -e <env> - Wait
1 minutethen rundocks asg list -e <env> | grep <orgId>again and ensure your cluster size went up by 1 - If it did not update, look at shiva logs and file a bug, then increment the
DesiredandMinof your autoscale group by 1 using AWS
After you have make your Auto Scale Group spin up a new instance you must now test it to ensure it works!
- Wait
15 minutesfor the new dock to spin up - run
docks aws -e <env> | <orgId> - find your newly crated dock (should gave your new AMI id listed)
- ssh into that dock
cat /var/log/user-script-dock-init.log- read the above log and look for the words
error, If you do not see anything then you are good - run
docker psand you should see aweaveandswarmcontainer running - exit the server and run
docks list -e <env>, your dock should show up in the list
After you have verified your dock has connected to the system it is time to test!
- Run all these test: https://github.com/CodeNow/devops-scripts/wiki/How-to-Test-an-API-Pull-Request
After you have successfully tested your dock you are ready to deploy it!!!
- Update Astral configs to have your new
Launch Configuration - Update existing
Auto Scaling Groupsto use your newLaunch Configuration