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

feat: add tools (helm, helmfile, helmplugins, sops) #961

Merged
merged 9 commits into from
Jan 2, 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
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