-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated infra for rocky and suseliberty (#439)
* updated infra for rocky and suseliberty * removing argument passed * revert rocky name ami change
- Loading branch information
1 parent
8a1fc27
commit 0f0bdb9
Showing
3 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"variables": { | ||
"name":"SuseLiberty-8.9", | ||
"source_ami":"ami-0649f5b1130930a5f", | ||
"access_key":"", | ||
"secret_key":"", | ||
"region":"us-east-2", | ||
"instance_type": "t3.medium", | ||
"os_version": "8.9", | ||
"arch_type": "x86_64" | ||
}, | ||
"builders": [{ | ||
"type": "amazon-ebs", | ||
"access_key": "{{user `access_key`}}", | ||
"secret_key":"{{user `secret_key`}}", | ||
"ami_name": "{{user `name`}}", | ||
"region": "{{user `region`}}", | ||
"ami_regions": [ | ||
"us-east-1", | ||
"us-east-2", | ||
"us-west-1", | ||
"us-west-2" | ||
], | ||
"source_ami": "{{user `source_ami`}}", | ||
"instance_type": "{{user `instance_type`}}", | ||
"communicator": "ssh", | ||
"ssh_username": "ec2-user", | ||
"force_deregister": true, | ||
"run_tags":{"Name":"{{user `name`}}"} | ||
}], | ||
"provisioners": [ | ||
{ | ||
"type": "file", | ||
"source": "setup_rocky_repo_mirrors.sh", | ||
"destination": "/tmp/setup_rocky_repo_mirrors.sh" | ||
}, | ||
{ | ||
"type": "shell", | ||
"inline": "sudo chmod +x /tmp/setup_rocky_repo_mirrors.sh && sudo /tmp/setup_rocky_repo_mirrors.sh {{user `os_version`}} {{user `arch_type`}}" | ||
}, | ||
{ | ||
"type": "file", | ||
"source": "disable_nm_cloud_setup.sh", | ||
"destination": "/tmp/disable_nm_cloud_setup.sh" | ||
}, | ||
{ | ||
"type": "shell", | ||
"inline": "sudo chmod +x /tmp/disable_nm_cloud_setup.sh && sudo /tmp/disable_nm_cloud_setup.sh" | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
# Use rocky's repo mirrors for Suse Liberty 8.9 setup | ||
# Refer: https://github.com/k3s-io/k3s/issues/10367#issuecomment-2181517372 | ||
RELEASE_VER="$1" | ||
BASE_ARCH="$2" | ||
CONTENT_DIR="pub/rocky" | ||
APPSTREAM_FILE="/tmp/repo_content_file" | ||
DEVEL_FILE="/tmp/repo_content_file" | ||
|
||
echo "[appstream] | ||
name=Rocky Linux ${RELEASE_VER} - AppStream | ||
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=${BASE_ARCH}&repo=AppStream-${RELEASE_VER} | ||
#baseurl=http://dl.rockylinux.org/${CONTENT_DIR}/${RELEASE_VER}/AppStream/${BASE_ARCH}/os/ | ||
gpgcheck=0 | ||
enabled=1" > "${APPSTREAM_FILE}" | ||
|
||
cat "${APPSTREAM_FILE}" | sudo tee -a /etc/yum.repos.d/Appstream.repo | ||
|
||
echo "[develrepo] | ||
name=Rocky Linux ${RELEASE_VER} - Devel | ||
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=${BASE_ARCH}&repo=rocky-devel-${RELEASE_VER} | ||
#baseurl=https://dl.rockylinux.org/${CONTENT_DIR}/${RELEASE_VER}/devel/${BASE_ARCH}/os/ | ||
gpgcheck=0 | ||
enabled=1" > "${DEVEL_FILE}" | ||
|
||
cat "${DEVEL_FILE}" | sudo tee -a /etc/yum.repos.d/Devel.repo |