summaryrefslogtreecommitdiff
path: root/README
blob: d78fe93abc0728dd8be1b2bcff1efd4dd8f31cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Ansible configuration for AMIs

These are ansible sets to configure new server images, to save as
preconfigured images (AMIs).

---

To create a fresh pipeliner image:

- Find the latest Debian AMI ID by finding the latest one from here: https://wiki.debian.org/Cloud/AmazonEC2Image/Buster in the output from:
  aws ec2 describe-images --owner 136693071363

- Create a new instance with the AMI id:
  aws ec2 run-instances --image-id <imageid> --instance-type t2.micro --security-groups launch-wizard-1 --key-name awsdev2 --iam-instance-profile Name=pipeliner

- Get public IP address of the instance once it is running:
  lspipeline -nobooks

- Update the ansible_host variable with the public IP of the new instance:
  host_vars/pipelineami

- Run ansible:
  ansible-playbook --ask-vault-pass -i hosts pipeliner.yml

- Get names of old images for reference:
  aws ec2 describe-images --owners self

- Create image:
  aws ec2 create-image --instance-id <id> --name <newimagename>

- Update spotImage in bookpipeline/cloudsettings.go

---

To create a fresh rudpad image is very similar to the above:

- Find the latest Debian AMI ID by finding the latest one from here: https://wiki.debian.org/Cloud/AmazonEC2Image/Buster in the output from:
  aws ec2 describe-images --owner 136693071363

- Create a new instance with the AMI id:
  aws ec2 run-instances --image-id <imageid> --instance-type t2.micro --security-groups launch-wizard-1 --key-name awsdev2 --iam-instance-profile Name=rudpadder

- Get public IP address of the instance once it is running:
  lspipeline -nobooks

- Update the ansible_host variable with the public IP of the new instance:
  host_vars/rudpadami

- Run ansible:
  ansible-playbook -i hosts rudpad.yml

- Get names of old images for reference:
  aws ec2 describe-images --owners self

- Create image:
  aws ec2 create-image --instance-id <id> --name <newimagename>

- Run a fresh instance using the image:
  aws ec2 run-instances --image-id ami-00233dea4b2982690 --instance-type t2.micro --security-groups launch-wizard-1 --key-name awsdev2 --iam-instance-profile Name=rudpadder --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=rudpad}]'