Skip to content

Commit

Permalink
Merge pull request #961 from smerle33/add/tools
Browse files Browse the repository at this point in the history
feat: add tools (helm, helmfile, helmplugins, sops)
  • Loading branch information
smerle33 authored Jan 2, 2024
2 parents f19f4e6 + e1dd775 commit af8e073
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
22 changes: 22 additions & 0 deletions goss/goss-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,23 @@ command:
exit-status: 0
stdout:
- 2.12.0
helm:
exec: helm version
exit-status: 0
stdout:
- 3.13.2
helmfile:
exec: helmfile --version
exit-status: 0
stdout:
- 0.159.0
helmplugins:
exec: helm plugin list
exit-status: 0
stdout:
- /diff.*3.8.1/
- /helm-git.*0.15.1/
- /secrets.*4.5.1/
jdk11:
exec: /opt/jdk-11/bin/java --version
exit-status: 0
Expand Down Expand Up @@ -162,6 +179,11 @@ command:
exit-status: 0
stdout:
- 2.6.10
sops:
exec: sops --version
exit-status: 0
stdout:
- 3.8.1
ssh_agent:
exec: command -v ssh-agent
exit-status: 0
Expand Down
6 changes: 6 additions & 0 deletions provisioning/tools-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ git_linux_version: 2.43.0
git_windows_version: 2.43.0
goss_version: 0.4.4
hadolint_version: 2.12.0
helm_version: 3.13.2
helm_diff_version: 3.8.1
helmfile_version: 0.159.0
helm_git_version: 0.15.1
helm_secrets_version: 4.5.1
jdk11_version: 11.0.21+9
jdk17_version: 17.0.8.1+1
jdk21_version: 21.0.1+12
Expand All @@ -31,6 +36,7 @@ openssh_authorized_keys_url: https://raw.githubusercontent.com/jenkins-infra/aws
packer_version: 1.10.0
python3_version: 3.12.1
ruby_version: 2.6.10
sops_version: 3.8.1
terraform_version: 1.6.6
trivy_version: 0.47.0
updatecli_version: 0.70.0
Expand Down
30 changes: 30 additions & 0 deletions provisioning/ubuntu-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,33 @@ function install_doctl(){
"https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-${ARCHITECTURE}.tar.gz" | tar --extract --gunzip --directory="${install_dir}"/ doctl
}

## Ensure that`helm` and its plugins are installed
function install_helm(){
install_dir=/usr/local/bin
curl --fail --silent --location --show-error \
"https://get.helm.sh/helm-v${HELM_VERSION}-linux-${ARCHITECTURE}.tar.gz" | \
tar --extract --gunzip --strip-components 1 --directory="${install_dir}"/ "linux-${ARCHITECTURE}/helm"

su - "${username}" -c "helm plugin install https://github.com/databus23/helm-diff --version v${HELM_DIFF_VERSION}"
su - "${username}" -c "helm plugin install https://github.com/jkroepke/helm-secrets --version v${HELM_SECRETS_VERSION}"
su - "${username}" -c "helm plugin install https://github.com/aslafy-z/helm-git.git --version v${HELM_GIT_VERSION}"
}

## Ensure that`helmfile` is installed
function install_helmfile(){
install_dir=/usr/local/bin
curl --fail --silent --location --show-error \
"https://github.com/helmfile/helmfile/releases/download/v${HELMFILE_VERSION}/helmfile_${HELMFILE_VERSION}_linux_${ARCHITECTURE}.tar.gz" | \
tar --extract --gunzip --directory="${install_dir}"/ helmfile
}

## Ensure that`sops` is installed
function install_sops(){
install_dir=/usr/local/bin
curl --fail --silent --location --show-error --output "${install_dir}"/sops \
"https://github.com/mozilla/sops/releases/download/v${SOPS_VERSION}/sops-v${SOPS_VERSION}.linux.${ARCHITECTURE}"
chmod +x "${install_dir}"/sops
}

## Ensure that maven is installed and configured (version from environment)
function install_maven() {
Expand Down Expand Up @@ -671,6 +698,9 @@ function main() {
install_nodejs
install_playwright
install_launchable
install_helm
install_helmfile
install_sops

echo "== Installed packages:"
dpkg -l
Expand Down

0 comments on commit af8e073

Please sign in to comment.