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

Rocky8 Linux AWS Compute Nodes #124

Merged
Merged
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
4 changes: 2 additions & 2 deletions roles/packer/files/all.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ source "amazon-ebs" "aws" {
instance_type = var.aws_instance_type
source_ami_filter {
filters = {
name = "CentOS 8.*"
name = "Rocky-8*"
architecture = var.aws_arch
}
owners = ["125523088429"]
owners = ["792107900819"] #Owner ID as stated from https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049/25
most_recent = true
}
ssh_username = var.ssh_username
Expand Down
6 changes: 5 additions & 1 deletion roles/packer/templates/prepare_ansible.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ $(hostname)
cluster_id={{ startnode_config.cluster_id }}
packer_run=yes
EOF'
{% if ansible_local.citc.csp in ["aws", "google"] %}
{% if ansible_local.citc.csp == "google" %}
sudo yum install -y epel-release
sudo dnf config-manager --set-enabled powertools
{% elif ansible_local.citc.csp == "aws" %}
sudo yum install -y epel-release
sudo dnf config-manager --set-enabled powertools
sudo dnf install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)
{% elif ansible_local.citc.csp == "oracle" %}
sudo dnf install -y oracle-epel-release-el8
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Expand Down
4 changes: 2 additions & 2 deletions roles/packer/templates/variables.pkrvars.hcl.j2
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ca_cert = "{{ ca_cert }}"
cluster = "{{ startnode_config.cluster_id }}"
destination_image_name = "citc-slurm-compute"
ssh_username = "{%- if ansible_local.citc.csp in ["aws", "google"] -%}centos{%- else -%}opc{%- endif -%}"
ssh_username = "{%- if ansible_local.citc.csp in ["google"] -%}centos{%- elif ansible_local.citc.csp in ["aws"] -%}rocky{%- else -%}opc{%- endif -%}"

aws_arch = "x86_64"
aws_region = "{%- if startnode_config.region is defined -%}{{ startnode_config.region }}{%- endif -%}"
aws_instance_type = "t2.nano"
aws_instance_type = "t2.micro"

google_destination_image_family = "citc-slurm-compute"
google_network = "{%- if startnode_config.network_name is defined -%}{{ startnode_config.network_name }}{%- endif -%}"
Expand Down