Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IT-3964] Create an AMI for agora #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions src/playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,31 @@
become: true

tasks:
- name: Add Mongo DB repository
ansible.builtin.yum_repository:
name: mongodb
description: MongoDB repo
baseurl: https://repo.mongodb.org/yum/amazon/2023/mongodb-org/8.0/x86_64/
gpgcheck: true
gpgkey: https://pgp.mongodb.com/server-8.0.asc

- name: Add Microsoft repository
ansible.builtin.yum_repository:
name: microsoft
description: Microsoft repo
baseurl: https://packages.microsoft.com/config/centos/8/packages-microsoft-prod
gpgcheck: true

- name: Install packages
ansible.builtin.apt:
ansible.builtin.dnf:
state: present
update_cache: true
pkg:
- "python3-pip"
- python
- python-pip
- mongodb-mongosh-shared-openssl3
- mongodb-database-tools
- dotnet-sdk-8.0

- name: Install python packages
ansible.builtin.pip:
Expand Down
13 changes: 7 additions & 6 deletions src/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"launch_block_device_mappings": [
{
"delete_on_termination": true,
"device_name": "/dev/sda1",
"device_name": "/dev/xvda",
"volume_size": "{{user `VolumeSize`}}",
"volume_type": "gp3"
}
Expand All @@ -25,13 +25,13 @@
"snapshot_groups": "{{user `SnapshotGroups`}}",
"source_ami_filter": {
"filters": {
"name": "ubuntu/images/*ubuntu-jammy-22.04-amd64-server-*",
"name": "al2023-ami-*-kernel-*-x86_64",
"root-device-type": "ebs",
"virtualization-type": "hvm"
},
"most_recent": true,
"owners": [
"099720109477"
"137112412989"
]
},
"ssh_username": "{{user `SshUsername`}}",
Expand All @@ -42,6 +42,7 @@
"SourceAmiId": "{{ .SourceAMI }}",
"SourceAmiName": "{{ .SourceAMIName }}"
},
"temporary_key_pair_type": "ed25519",
"token": "{{user `aws_session_token`}}",
"type": "amazon-ebs"
}
Expand Down Expand Up @@ -69,11 +70,11 @@
"variables": {
"AmiGroups": "all",
"EncryptBoot": "false",
"InstanceType": "t3.nano",
"InstanceType": "t3.micro",
"OwnerEmail": "[email protected]",
"SnapshotGroups": "all",
"SshUsername": "ubuntu",
"VolumeSize": "16",
"SshUsername": "ec2-user",
"VolumeSize": "64",
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_profile": "{{env `AWS_PROFILE`}}",
"aws_region": "{{env `AWS_DEFAULT_REGION`}}",
Expand Down
Loading