Skip to content

[minor] Install UBI-9 and ArgoCD and ROSA CLIs for gitops #8

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

Merged
merged 9 commits into from
Jul 4, 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
15 changes: 10 additions & 5 deletions .github/workflows/build-cli-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ jobs:
# https://github.com/marketplace/actions/push-to-registry
- name: Push the docker image
id: push_to_quay
uses: redhat-actions/push-to-registry@v2
with:
tags: quay.io/ibmmas/cli-base:${{ env.DOCKER_TAG }}
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
run: |
docker images
docker login --username "${{ secrets.QUAYIO_USERNAME }}" --password "${{ secrets.QUAYIO_PASSWORD }}" quay.io
docker push quay.io/ibmmas/cli-base:${{ env.DOCKER_TAG }}
# Old version ...
# uses: redhat-actions/push-to-registry@v2
# with:
# tags: quay.io/ibmmas/cli-base:${{ env.DOCKER_TAG }}
# username: ${{ secrets.QUAYIO_USERNAME }}
# password: ${{ secrets.QUAYIO_PASSWORD }}
4 changes: 3 additions & 1 deletion image/cli-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/python-39
FROM registry.access.redhat.com/ubi9/python-39
ARG VERSION_LABEL
# ----- Start as "default" user ----------------------------------------------
# Running as userId = default
Expand Down Expand Up @@ -28,6 +28,8 @@ RUN umask 0002 && \
bash /tmp/install/install-helm.sh && \
bash /tmp/install/install-mongo-tools.sh && \
bash /tmp/install/install-yq.sh && \
bash /tmp/install/install-argocd.sh && \
bash /tmp/install/install-rosa.sh && \
bash /tmp/install/install-rclone.sh && \
rm -rf /tmp/install && \
rm /opt/app-root/src/.wget-hsts /opt/app-root/src/README.md /opt/app-root/src/LICENSE
Expand Down
7 changes: 7 additions & 0 deletions image/cli-base/install/install-argocd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Install ArgoCD CLI
set -e
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 && \
install -m 555 argocd-linux-amd64 /usr/local/bin/argocd && \
rm argocd-linux-amd64
16 changes: 8 additions & 8 deletions image/cli-base/install/install-mongo-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
# Install Mongo Shell
set -e

curl "https://downloads.mongodb.com/compass/mongodb-mongosh-shared-openssl11-1.10.5.x86_64.rpm" -o mongodb-mongosh-shared-openssl11-1.10.5.x86_64.rpm
rpm -i mongodb-mongosh-shared-openssl11-1.10.5.x86_64.rpm
curl "https://downloads.mongodb.com/compass/mongodb-mongosh-shared-openssl3-2.2.9.x86_64.rpm" -o mongodb-mongosh-shared-openssl3-2.2.9.x86_64.rpm
rpm -i mongodb-mongosh-shared-openssl3-2.2.9.x86_64.rpm

mongosh --version
rm mongodb-mongosh-shared-openssl11-1.10.5.x86_64.rpm
rm mongodb-mongosh-shared-openssl3-2.2.9.x86_64.rpm

# Install Mongo Tools
curl "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-rhel80-x86_64-100.8.0.tgz" -o mongodb-database-tools-rhel80-x86_64-100.8.0.tgz
tar xvfz mongodb-database-tools-rhel80-x86_64-100.8.0.tgz
curl "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-rhel90-x86_64-100.9.5.tgz" -o mongodb-database-tools-rhel90-x86_64-100.9.5.tgz
tar xvfz mongodb-database-tools-rhel90-x86_64-100.9.5.tgz

mv mongodb-database-tools-rhel80-x86_64-100.8.0/bin/* /usr/local/bin/
rm -rf mongodb-database-tools-rhel80-x86_64-100.8.0
rm mongodb-database-tools-rhel80-x86_64-100.8.0.tgz
mv mongodb-database-tools-rhel90-x86_64-100.9.5/bin/* /usr/local/bin/
rm -rf mongodb-database-tools-rhel90-x86_64-100.9.5
rm mongodb-database-tools-rhel90-x86_64-100.9.5.tgz

mongodump --version
11 changes: 11 additions & 0 deletions image/cli-base/install/install-rosa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Install ROSA Cli
set -e

wget -q https://mirror.openshift.com/pub/openshift-v4/clients/rosa/latest/rosa-linux.tar.gz
tar -xzf rosa-linux.tar.gz
mv rosa /usr/local/bin/
chmod +x /usr/local/bin/rosa
chown default:root /usr/local/bin/rosa
rosa version
rm -rf rosa-linux.tar.gz
2 changes: 2 additions & 0 deletions image/cli-base/install/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ openshift==0.13.2
jmespath==1.0.1
click==8.1.7
prettytable==3.9.0
jinja-cli==1.2.2
yq==3.2.2
slackclient==1.3.2
jira==3.5.2
Loading