From 974a78f238c34e84be236b669392bbc5cde9f062 Mon Sep 17 00:00:00 2001 From: Olivier Grand Date: Thu, 5 May 2022 11:55:55 +0200 Subject: [PATCH] fix gcloud cli installation, add k9s argo plugin and update flux cli to 0.29.5 --- Dockerfile | 8 ++++---- bosh-cli/profile | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78e7744..4c1e75a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,8 @@ ENV ARGO_CLI_VERSION="3.3.2" \ CF_CLI_VERSION="8.3.0" \ CF_UAAC_VERSION="4.5.0" \ CREDHUB_VERSION="2.9.3" \ - FLUX_VERSION="0.27.0" \ + FLUX_VERSION="0.29.5" \ FLY_VERSION="7.6.0" \ - GCP_CLI_VERSION="384.0.0" \ GOVC_VERSION="0.27.4" \ GO3FR_VERSION="0.5.0" \ HELM_VERSION="3.7.2" \ @@ -86,7 +85,7 @@ RUN printf '\n=====================================================\n Install sy printf '\n=> Add CREDHUB-CLI\n' && curl -sSL "https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz" | tar -xz -C /usr/local/bin && \ printf '\n=> Add FLY-CLI\n' && curl -sSL "https://github.com/concourse/concourse/releases/download/v${FLY_VERSION}/fly-${FLY_VERSION}-linux-amd64.tgz" | tar -xz -C /usr/local/bin && \ printf '\n=> Add FLUX-CLI\n' && curl -sSL "https://github.com/fluxcd/flux2/releases/download/v${FLUX_VERSION}/flux_${FLUX_VERSION}_linux_amd64.tar.gz" | tar -xz -C /usr/local/bin && \ - printf '\n=> Add GCP-CLI\n' && echo "deb https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && apt-get update && apt-get install -y --no-install-recommends google-cloud-cli && \ + printf '\n=> Add GCP-CLI\n' && echo "deb https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list && chmod 1777 /tmp && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && apt-get update && apt-get install -y --no-install-recommends google-cloud-cli && \ printf '\n=> Add GOVC-CLI\n' && curl -sSL "https://github.com/vmware/govmomi/releases/download/v${GOVC_VERSION}/govc_Linux_x86_64.tar.gz" | tar -xz -C /tmp && mv /tmp/govc /usr/local/bin/govc && \ printf '\n=> Add GO3FR-CLI\n' && curl -sSL "https://github.com/rlmcpherson/s3gof3r/releases/download/v${GO3FR_VERSION}/gof3r_${GO3FR_VERSION}_linux_amd64.tar.gz" | tar -xz -C /tmp && mv /tmp/gof3r_${GO3FR_VERSION}_linux_amd64/gof3r /usr/local/bin/go3fr && \ printf '\n=> Add HELM-CLI\n' && curl -sSL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" | tar -xz -C /tmp && mv /tmp/linux-amd64/helm /usr/local/bin/helm && chmod 755 /usr/local/bin/helm && \ @@ -148,11 +147,12 @@ RUN printf '\n=====================================================\n Install sy printf '\nNotes :\n' >> /etc/motd && \ printf ' "tools" command gives available tools.\n' >> /etc/motd && \ printf ' All path except "/data/shared" are not persistant (do not save data on it).\n\n' >> /etc/motd && \ + chmod 644 /etc/motd && \ printf '\n=====================================================\n Configure system and cleanup docker image\n=====================================================\n' && \ apt-get upgrade -y && apt-get autoremove -y && apt-get clean && apt-get purge && \ locale-gen en_US.UTF-8 && \ + mkdir -p /home/bosh/.ssh && chmod 700 /home/bosh /home/bosh/.ssh && \ mv /tmp/bosh-cli/*.sh /usr/local/bin/ && mv /tmp/bosh-cli/sshd.conf /etc/supervisor/conf.d/ && mv /tmp/bosh-cli/profile /home/bosh/.profile && chmod 664 /home/bosh/.profile && \ - chmod 644 /etc/motd && mkdir -p /home/bosh/.ssh && chmod 700 /home/bosh /home/bosh/.ssh && \ chmod 1777 /tmp && chmod 755 /usr/local/bin/* /etc/profile.d/* && \ find /usr/local/bin -print0 | xargs -0 chown root:root && find /home/bosh /data -print0 | xargs -0 chown bosh:users && \ rm -fr /tmp/* /var/lib/apt/lists/* /var/tmp/* && find /var/log -type f -delete && \ diff --git a/bosh-cli/profile b/bosh-cli/profile index d075e31..dc41e29 100644 --- a/bosh-cli/profile +++ b/bosh-cli/profile @@ -115,6 +115,16 @@ plugin: args: - -c - "flux reconcile kustomization --context $CONTEXT -n $NAMESPACE $NAME | less" + submit-argo-workflow-template: + shortCut: t + confirm: true + description: Submit argo workflow + scopes: + - workflowtemplates + command: sh + args: + - -c + - "argo submit --from workflowtemplate/$NAME -n $NAMESPACE | less" EOF #--- Copy bash user configuration