Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 1 | How to deploy TryMOS on AWS |
| 2 | =========================== |
| 3 | |
| 4 | 1. Dowload tryMOS image from Mirantis repo |
| 5 | wget https://artifactory.mcp.mirantis.net/artifactory/binary-dev-kaas-local/trymos/bin/trymos-bionic-amd64-master-20210316183204.qcow2 |
| 6 | |
| 7 | 2. Convert QCOW2 image to RAW format |
| 8 | qemu-img convert -f qcow2 -O raw ./trymos-bionic-amd64-master-20210316183204.qcow2 ./trymos-bionic-amd64-master-20210316183204.raw |
| 9 | |
| 10 | 3. Upload RAW image to S3 storage, where `trymos-raw` name of a bucket |
| 11 | aws s3 cp ./trymos-bionic-amd64-master-20210316183204.raw s3://trymos-raw |
| 12 | |
| 13 | 4. Create a snapshot from the image which had been uploaded |
| 14 | aws ec2 import-snapshot --disk-container file://containers.json |
| 15 | |
| 16 | containers.json |
| 17 | |
| 18 | { |
| 19 | "Description": "TryMOS RAW", |
| 20 | "Format": "RAW", |
| 21 | "UserBucket": { |
| 22 | "S3Bucket": "trymos-raw", |
| 23 | "S3Key": "trymos-bionic-amd64-master-20210316183204.raw" |
| 24 | } |
| 25 | } |
| 26 | |
Vasyl Saienko | e967706 | 2021-03-19 13:31:32 +0200 | [diff] [blame] | 27 | 5. Wait unless task is completed `aws ec2 describe-import-snapshot-tasks --import-task-ids <task-id>` |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 28 | |
Vasyl Saienko | e967706 | 2021-03-19 13:31:32 +0200 | [diff] [blame] | 29 | 6. Create an image from the snapshot in EC2 Service -> Elastic Block Store -> Snapshots -> Actions -> Create image |
| 30 | with root storage 35Gb and additional volume 20Gb (volume type EBS (gp3)) |
| 31 | |
| 32 | 7. Launch instance from the image EC2 Service -> Images -> AMIs -> Launch with flavor minimal 16 CPUs and |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 33 | 30Gb RAM (c4.4xlarge). |
| 34 | |
Vasyl Saienko | e967706 | 2021-03-19 13:31:32 +0200 | [diff] [blame] | 35 | 8. Connect to intance via external IP with keyfile which was defined during instance was brought up as root |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 36 | ssh 13.59.177.99 -i ./trymos-pair.pem -l root |
| 37 | |
Oleh Hryhorov | ac5f601 | 2021-03-05 18:26:25 +0200 | [diff] [blame] | 38 | 9. Run installation script |
Vasyl Saienko | e967706 | 2021-03-19 13:31:32 +0200 | [diff] [blame] | 39 | /usr/share/trymos/launch.sh |