Migrate the repo to https://git.trustedfirmware.org/ci/aws-amis.git/
Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: Ic39e485be0faaa00b786856832115a2d439d1799
diff --git a/README.txt b/README.txt
index fed29bc..2a2f247 100644
--- a/README.txt
+++ b/README.txt
@@ -1,6 +1 @@
-These are the packer build templates we use to create the AMIs
-used by the TrustedFirmware CI system.
-
-packer_freebsd.json -- produces the mbedtls FreeBSD AMI
-packer_ubuntu.json -- produces the mbedtls Linux AMI
-packer_custom.json -- produces an Ubuntu based utility AMI
+The repo was migrated to https://git.trustedfirmware.org/ci/aws-amis.git/
diff --git a/custom.sh b/custom.sh
deleted file mode 100755
index 0927cab..0000000
--- a/custom.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-set -eu
-apt-get -qq update
-DEBIAN_FRONTEND=noninteractive apt-get install -qy \
- apt-transport-https \
- ca-certificates \
- curl \
- gnupg \
- gnupg-agent \
- openjdk-11-jdk-headless \
- python3 \
- python3-venv \
- software-properties-common \
- unzip
-
-curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
-add-apt-repository \
- "deb https://download.docker.com/linux/ubuntu \
- $(lsb_release -cs) \
- stable"
-
-apt-get -qq update
-DEBIAN_FRONTEND=noninteractive apt-get install -qy --no-install-recommends \
- docker-ce \
- docker-ce-cli
-
-update-alternatives --install /usr/bin/python python /usr/bin/python3 1
-
-if [ $(uname -m) = "aarch64" ]
-then
- AWS_ZIP=https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip
-else
- AWS_ZIP=https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
-fi
-
-curl "$AWS_ZIP" -o "/tmp/awscli-bundle.zip"
-unzip -q -d /tmp/awscli /tmp/awscli-bundle.zip
-/tmp/awscli/aws/install -i /usr/local/aws
-aws --version
-
-adduser ubuntu docker
-
-mkdir /home/ubuntu/.aws
-echo '[default]' >> /home/ubuntu/.aws/config
-echo 'region = us-east-1' >> /home/ubuntu/.aws/config
-
-# Disable unattended-upgrade
-systemctl disable unattended-upgrades.service
-apt-get -y remove unattended-upgrades
-
-sed -i -e 's/#PermitTTY.*/PermitTTY yes/g' /etc/ssh/sshd_config
-
-# install packer. We are using an older version because current 1.8.5 has
-# a bug in it that prevents the temp ssh key from being setup for freebsd
-curl --output packer.zip https://releases.hashicorp.com/packer/1.5.1/packer_1.5.1_linux_amd64.zip
-unzip -o packer.zip
-install -m 755 packer /usr/bin/packer
diff --git a/freebsd.sh b/freebsd.sh
deleted file mode 100644
index 699b66a..0000000
--- a/freebsd.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /usr/bin/env sh
-
-pkg install -y \
- curl \
- git \
- gnupg \
- openjdk11 \
- python3 \
- unzip \
- cmake \
- valgrind \
- doxygen \
- graphviz \
- lcov \
- wget \
- lsof \
- gmake \
- perl5 \
- bash \
- py39-pip
-
-mount -t fdescfs fdesc /dev/fd
-mount -t procfs proc /proc
-
-echo 'fdesc /dev/fd fdescfs rw 0 0' >> /etc/fstab
-echo 'proc /proc procfs rw 0 0' >> /etc/fstab
diff --git a/packer_custom.json b/packer_custom.json
deleted file mode 100644
index 7f81a0c..0000000
--- a/packer_custom.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "variables": {
- "vpc_region": "us-east-1",
- "ssh_username": "ubuntu"
- },
- "builders": [
- {
- "type": "amazon-ebs",
- "name": "ubuntu-20.04-custom",
- "vpc_id": "vpc-d28c0ca9",
- "subnet_id": "subnet-a0d573af",
- "region": "{{user `vpc_region`}}",
- "source_ami_filter": {
- "filters": {
- "virtualization-type": "hvm",
- "name": "ubuntu/images/*ubuntu-focal-20.04-amd64-server-*",
- "root-device-type": "ebs"
- },
- "owners": ["099720109477"],
- "most_recent": true
- },
- "instance_type": "m5a.large",
- "ssh_username": "{{user `ssh_username`}}",
- "ami_name": "jenkins-custom-amd64-{{isotime \"2006-01-02-1504\"}}",
- "ami_regions": ["eu-central-1" ],
- "ami_users": [
- "987685672616"
- ],
- "snapshot_users": [
- "987685672616"
- ],
- "launch_block_device_mappings": [
- {
- "device_name": "/dev/sda1",
- "volume_type": "gp2",
- "volume_size": "40",
- "delete_on_termination": true
- }
- ]
- }
- ],
- "provisioners": [
- {
- "type": "shell",
- "inline": [ "sleep 60" ]
- },
- {
- "type": "shell",
- "script": "custom.sh",
- "execute_command": "{{.Vars}} sudo -E sh -eux '{{.Path}}'"
- }
- ]
-}
diff --git a/packer_freebsd.json b/packer_freebsd.json
deleted file mode 100644
index ecc6724..0000000
--- a/packer_freebsd.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "variables": {
- "vpc_region": "us-east-1",
- "ssh_username": "ec2-user"
- },
- "builders": [
- {
- "type": "amazon-ebs",
- "name": "freebsd-12.3-mbedtls",
- "vpc_id": "vpc-d28c0ca9",
- "subnet_id": "subnet-a0d573af ",
- "region": "{{user `vpc_region`}}",
- "source_ami_filter": {
- "filters": {
- "image-id": "ami-0ffeb62fb62c3e3df",
- "product-code": "ejmg4fgac56dgb0xac6m4fpis"
- },
- "owners": ["aws-marketplace"],
- "most_recent": true
- },
- "instance_type": "t3.medium",
- "ssh_username": "{{user `ssh_username`}}",
- "ami_name": "jenkins-freebsd-amd64-{{isotime \"2006-01-02-1504\"}}",
- "ami_regions": ["eu-central-1"],
- "ami_users": [
- "987685672616"
- ],
- "snapshot_users": [
- "987685672616"
- ],
- "launch_block_device_mappings": [
- {
- "device_name": "/dev/sda1",
- "volume_type": "gp2",
- "volume_size": "30",
- "delete_on_termination": true
- }
- ]
- }
- ],
- "provisioners": [
- {
- "type": "shell",
- "inline": [ "sleep 60" ]
- },
- {
- "type": "shell",
- "execute_command": "chmod +x {{.Path}}; /bin/sh {{.Path}}",
- "inline": [
- "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDUkTXHpvPd6doR4vBDEY2t7D0PqSvZEv/D6mavMhztZHkf3TupVS2hTtiZdMwccFpP2RlCnQa7njV02Dx0JEcQwyklIOaSDqFx6LqVDEw0UidoNYrMDdqFOjQsGHThZ09DogPvJ3DUqdYOiTq3vI4OaQzFet+x/JJzJo/iXmNHf8vONCjSiqLIUWw8cgImvvFnVJPy1Rh6x6y6+CfAkDsG4HraDQkzcZzZE4wLs5Fddmdyw5dk8UHH2UH6q/yN9tT3Z36BjumStytYFAcVjiZrkk7da+N5tmjpg/7tbJrQVB9b5sNEjFjyg6zCsc8wktLVk472MuIuHiWSYGDWN4Ar4Pmd24pMgraQA513zR1PChTAeI1VKTvVb9nGUt8rWIJpzkSZiXC2rhoU2STfY+3LsGjnIhWc5OQHs//VGxoy2etKbd1y6/+cO+rbgmk5rQO4KXFCRwj6AWZqyg/BCtSr398YmK3xYjCM8T2cJ04gb3I376pB/RbTvGBwvjcTpGUhWrMCt+V8f61NKVHlH/Of/Dv60IpE68iDv/7zmjXJlmZCvnQkDz9I89eM/RRGkcy+JWZvyAkD/Su2eG1/1dPA48jrVoCB5+f7W8/2iO1jnqpjtggKkFmW1eSo5D5wdLnZTuwVBZQmx9fkZqPt+3796hCwM9lWfVkjsprPVQRqxw== tf-staging-key' > /home/ec2-user/.ssh/authorized_keys",
- "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCSF9HT6oMDD+7ztIlQmUtCz8qcfS+5MUEnABudsKAFW2ih7XyyLD5xXYZIeMvQLo65Mfzi5DGKBs85Kaw7kLCiNkaU4a8OzjipUfjM0QyHbMo5wjChBhMxqIyx9NK8lpcBPeJquUns07sXs+NRxQ/yc9QQ1kLf61vWPim+R+PW2f0aL+GGTYlZq/v4Ik1GHahSM/5g51skGOsUeh1w4qhlNvE3VQFGQT4rqlnzQDmmhdIjfEJhp574ldwOOALm50OWa62auVPAGwcDujqf/GoX/HMugxVaKryDyrTu+5+lMPUbizf8Lhu4UuBfCPeK0K/gbhdn5M4d4mc0Qd4oaRf5' >> /home/ec2-user/.ssh/authorized_keys",
- "chmod 600 /home/ec2-user/.ssh/authorized_keys"
- ]
- },
- {
- "type": "shell",
- "script": "freebsd.sh",
- "execute_command": "{{.Vars}} su root -c '{{.Path}}'"
- }
- ]
-}
diff --git a/packer_ubuntu.json b/packer_ubuntu.json
deleted file mode 100644
index da2a1f7..0000000
--- a/packer_ubuntu.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "variables": {
- "vpc_region": "us-east-1",
- "ssh_username": "ubuntu"
- },
- "builders": [
- {
- "type": "amazon-ebs",
- "name": "ubuntu-20.04-mbedtls",
- "vpc_id": "vpc-d28c0ca9",
- "subnet_id": "subnet-a0d573af",
- "region": "{{user `vpc_region`}}",
- "source_ami_filter": {
- "filters": {
- "virtualization-type": "hvm",
- "name": "ubuntu/images/*ubuntu-focal-20.04-amd64-server-*",
- "root-device-type": "ebs"
- },
- "owners": ["099720109477"],
- "most_recent": true
- },
- "instance_type": "m5a.large",
- "ssh_username": "{{user `ssh_username`}}",
- "ami_name": "jenkins-amd64-{{isotime \"2006-01-02-1504\"}}",
- "ami_users": [
- "987685672616"
- ],
- "ami_regions": ["eu-central-1" ],
- "snapshot_users": [
- "987685672616"
- ],
- "launch_block_device_mappings": [
- {
- "device_name": "/dev/sda1",
- "volume_type": "gp3",
- "volume_size": "50",
- "delete_on_termination": true
- }
- ]
- }
- ],
- "provisioners": [
- {
- "type": "shell",
- "inline": [ "sleep 60" ]
- },
- {
- "type": "shell",
- "script": "ubuntu.sh",
- "execute_command": "{{.Vars}} sudo -E sh -eux '{{.Path}}'"
- }
- ]
-}
diff --git a/ubuntu.sh b/ubuntu.sh
deleted file mode 100755
index 9d3909c..0000000
--- a/ubuntu.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-
-set -eu
-apt-get -qq update
-DEBIAN_FRONTEND=noninteractive apt-get install -qy \
- apt-transport-https \
- ca-certificates \
- curl \
- gnupg \
- gnupg-agent \
- openjdk-11-jdk-headless \
- python3 \
- python3-venv \
- software-properties-common \
- unzip
-
-curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
-add-apt-repository \
- "deb https://download.docker.com/linux/ubuntu \
- $(lsb_release -cs) \
- stable"
-
-apt-get -qq update
-DEBIAN_FRONTEND=noninteractive apt-get install -qy --no-install-recommends \
- docker-ce \
- docker-ce-cli \
- docker-buildx-plugin
-
-update-alternatives --install /usr/bin/python python /usr/bin/python3 1
-
-if [ $(uname -m) = "aarch64" ]
-then
- AWS_ZIP=https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip
-else
- AWS_ZIP=https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
-fi
-
-curl "$AWS_ZIP" -o "/tmp/awscli-bundle.zip"
-unzip -q -d /tmp/awscli /tmp/awscli-bundle.zip
-/tmp/awscli/aws/install -i /usr/local/aws
-aws --version
-
-adduser ubuntu docker
-
-mkdir /home/ubuntu/.aws
-echo '[default]' >> /home/ubuntu/.aws/config
-echo 'region = us-east-1' >> /home/ubuntu/.aws/config
-
-# Disable unattended-upgrade
-systemctl disable unattended-upgrades.service
-apt-get -y remove unattended-upgrades
-
-sed -i -e 's/#PermitTTY.*/PermitTTY yes/g' /etc/ssh/sshd_config
-