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

DUPLO-16826 Add amazon-ecr-credential-helper #40

Merged
merged 2 commits into from
May 13, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# AWS credentials
- name: Packer AWS Role
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:

# Upload the image manifest
- name: Attach Manifest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packer-manifest.json
path: packer-manifest.json
Expand All @@ -117,7 +117,7 @@ jobs:
duplo_token: "${{ secrets.GOVCLOUD_DUPLO_TOKEN }}"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# AWS credentials
- name: Tenant AWS JIT
Expand All @@ -127,7 +127,7 @@ jobs:

# AWS credentials
- name: Packer AWS Role
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
Expand Down
8 changes: 6 additions & 2 deletions AgentAmazonLinux2/Setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ubuntuInstall () {
}


installDependancies () {
installDependencies () {

if [ "$OS" = "centos" ]; then
echo "Centos Installing docker"
Expand Down Expand Up @@ -115,6 +115,8 @@ installDependancies () {
sudo amazon-linux-extras install -q -y docker
sudo yum install -q -y docker
sudo usermod -a -G docker ec2-user
sudo yum install -q -y amazon-ecr-credential-helper
mkdir -p ~/.docker && echo '{ "credsStore": "ecr-login" }' > ~/.docker/config.json

sudo yum install -q -y git wget curl net-tools vim
sudo yum install -q -y yum-utils
Expand All @@ -139,6 +141,8 @@ installDependancies () {
echo "Ubuntu Installing Container Management Service"
sudo apt-get update
sudo apt install -q -y python3-dev python3-pip bridge-utils python3-virtualenv gcc
sudo apt install -q -y amazon-ecr-credential-helper
mkdir -p ~/.docker && echo '{ "credsStore": "ecr-login" }' > ~/.docker/config.json
###
options=`cat /etc/default/docker | grep bridge`
echo $options
Expand Down Expand Up @@ -197,7 +201,7 @@ echo "Step 1: Install Docker and setup docker bridge";
echo "--------------------------OS=$OS VER=$VER-------------------------------------1"
echo; echo;

installDependancies
installDependencies



Expand Down
6 changes: 4 additions & 2 deletions AgentUbuntu20/Setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ubuntuInstall () {
}


installDependancies () {
installDependencies () {

if [ "$OS" = "centos" ]; then
echo "Centos Installing docker"
Expand Down Expand Up @@ -112,6 +112,8 @@ installDependancies () {
echo "Ubuntu Installing Container Management Service"
sudo apt-get update
sudo apt install -q -y python3-dev python3-pip bridge-utils python3-virtualenv gcc
sudo apt install -q -y amazon-ecr-credential-helper
mkdir -p ~/.docker && echo '{ "credsStore": "ecr-login" }' > ~/.docker/config.json
###
options=`cat /etc/default/docker | grep bridge`
echo $options
Expand Down Expand Up @@ -165,7 +167,7 @@ echo "Step 1: Install Docker and setup docker bridge";
echo "--------------------------OS=$OS VER=$VER-------------------------------------1"
echo; echo;

installDependancies
installDependencies



Expand Down
8 changes: 6 additions & 2 deletions AgentUbuntu22/Setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ubuntuInstall () {
}


installDependancies () {
installDependencies () {

if [ "$OS" = "centos" ]; then
echo "Centos Installing docker"
Expand Down Expand Up @@ -116,6 +116,8 @@ installDependancies () {
sudo amazon-linux-extras install -q -y docker
sudo yum install -q -y docker
sudo usermod -a -G docker ec2-user
sudo yum install -q -y amazon-ecr-credential-helper
mkdir -p ~/.docker && echo '{ "credsStore": "ecr-login" }' > ~/.docker/config.json

sudo yum install -q -y git wget curl net-tools vim
sudo yum install -q -y yum-utils
Expand All @@ -140,6 +142,8 @@ installDependancies () {
echo "Ubuntu Installing Container Management Service"
sudo apt-get update
sudo apt install -q -y python3-dev python3-pip bridge-utils python3-virtualenv gcc
sudo apt install -q -y amazon-ecr-credential-helper
mkdir -p ~/.docker && echo '{ "credsStore": "ecr-login" }' > ~/.docker/config.json

###
options=`cat /etc/default/docker | grep bridge`
Expand Down Expand Up @@ -205,7 +209,7 @@ echo "Step 1: Install Docker and setup docker bridge";
echo "--------------------------OS=$OS VER=$VER-------------------------------------1"
echo; echo;

installDependancies
installDependencies



Expand Down
8 changes: 6 additions & 2 deletions AgentUbuntu22/SetupPython3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ubuntuInstall () {
}


installDependancies () {
installDependencies () {

if [ "$OS" = "centos" ]; then
echo "Centos Installing docker"
Expand Down Expand Up @@ -119,6 +119,8 @@ installDependancies () {
sudo amazon-linux-extras install -q -y docker
sudo yum install -q -y docker
sudo usermod -a -G docker ec2-user
sudo yum install -q -y amazon-ecr-credential-helper
mkdir -p ~/.docker && echo '{ "credsStore": "ecr-login" }' > ~/.docker/config.json

sudo yum install -q -y git wget curl net-tools vim
sudo yum install -q -y yum-utils
Expand All @@ -143,6 +145,8 @@ installDependancies () {
echo "Ubuntu Installing Container Management Service"
sudo apt-get update
sudo apt install -q -y python3-dev python3-pip bridge-utils python3-virtualenv gcc
sudo apt install -q -y amazon-ecr-credential-helper
mkdir -p ~/.docker && echo '{ "credsStore": "ecr-login" }' > ~/.docker/config.json

###
options=`cat /etc/default/docker | grep bridge`
Expand Down Expand Up @@ -208,7 +212,7 @@ echo "Step 1: Install Docker and setup docker bridge";
echo "--------------------------OS=$OS VER=$VER-------------------------------------1"
echo; echo;

installDependancies
installDependencies



Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 2024-04-18

### Added
- Installed `amazon-ecr-credential-helper` and configured Docker to use it across Ubuntu 20, Ubuntu 22, and AmazonLinux2 setups.

### Changed
- Corrected function name typo from `installDependancies` to `installDependencies` in setup scripts.
- Updated GitHub Actions in the workflow file to use newer versions (v4) for better performance and features.
Comment on lines +1 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHANGELOG.md update


## 2024-02-16

### Added
Expand Down
Loading