Skip to content

Commit

Permalink
[Lazy] Update components
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Oct 19, 2023
1 parent 0827693 commit 88b9006
Show file tree
Hide file tree
Showing 12 changed files with 168 additions and 103 deletions.
6 changes: 3 additions & 3 deletions lazy.ansible/.manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ system:
mount: []
docker: false
goss:
# @schema {"enum": [null, "0.3.21"]}
# @schema {"enum": [null, "0.4.2", "0.3.23"]}
version: ~
apt:
# @schema {"items": {"type": "string"}}
Expand All @@ -53,15 +53,15 @@ system:
# @schema {"type": ["null", "string"]}
config: ~
ansible:
# @schema {"enum": ["2.14.3", "2.13.8", "2.12.10"]}
# @schema {"enum": ["2.15.5", "2.14.11", "2.13.13"]}
# @option {"label": "Ansible version"}
version: ~
# @schema {"type": ["null", "string"]}
config: ~
# @schema {"items": {"type": "string"}}
dependencies: []
ansible-lint:
# @schema {"enum": [null, "6.14.2", "6.13.1", "6.12.2"]}
# @schema {"enum": [null, "6.14.6", "6.13.1", "6.12.2"]}
# @option {"label": "Ansible-lint version"}
version: ~
# @schema {"items": {"type": "string"}}
Expand Down
25 changes: 13 additions & 12 deletions lazy.ansible/.manala/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# Base #
########

FROM debian:bullseye-slim
FROM debian:bookworm-slim

ARG DEBIAN_FRONTEND="noninteractive"

ARG MANALA_USER_ID="1000"
ARG MANALA_GROUP_ID="1000"

ARG GOSU_VERSION="1.16"
ARG GOMPLATE_VERSION="3.11.4"
ARG GOMPLATE_VERSION="3.11.5"

# The 'container' environment variable tells systemd that it's running inside a
# Docker container environment.
Expand All @@ -20,9 +20,7 @@ ENV container="docker"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN \
# Backports
echo "deb http://deb.debian.org/debian {{ include "os_release" "VERSION_CODENAME" }}-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-get --quiet update \
apt-get --quiet update \
&& apt-get --quiet --yes --purge --autoremove upgrade \
&& apt-get --quiet --yes --no-install-recommends --verbose-versions install \
s6 \
Expand All @@ -38,12 +36,10 @@ RUN \
less \
vim \
socat \
# Apt keyrings (debian < bookworm)
&& mkdir --verbose --parents /etc/apt/keyrings \
# User
&& addgroup --gid ${MANALA_GROUP_ID} lazy \
&& adduser --home /home/lazy --shell /bin/bash --uid ${MANALA_USER_ID} --gecos lazy --ingroup lazy --disabled-password lazy \
&& mkdir --verbose --parents /run/user/${MANALA_USER_ID} && chown lazy:lazy /run/user/${MANALA_USER_ID} \
&& install --verbose --mode 0755 --group lazy --owner lazy --directory /run/user/${MANALA_USER_ID} \
&& echo "lazy ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/lazy \
# Gosu
&& curl -sSL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-{{ include "arch_map" (dict "amd64" "amd64" "arm64" "arm64") }}" \
Expand All @@ -54,7 +50,7 @@ RUN \
--output /usr/local/bin/gomplate \
&& chmod +x /usr/local/bin/gomplate \
# Bash completion
&& mkdir --verbose --parents /etc/bash_completion.d \
&& install --verbose --mode 0755 --directory /etc/bash_completion.d \
# Oh My Bash
&& git clone https://github.com/ohmybash/oh-my-bash.git /usr/local/share/oh-my-bash \
# Clean
Expand Down Expand Up @@ -84,16 +80,21 @@ RUN \
# Sudo
&& echo "Defaults env_keep += \"PIPX_*\"" > /etc/sudoers.d/pipx \
# Bash completion
&& activate-global-python-argcomplete3 --dest /etc/bash_completion.d \
&& activate-global-python-argcomplete --dest /etc/bash_completion.d \
# Clean
&& rm -rf /var/lib/apt/lists/*

{{ if .Vars.system.docker -}}
# Docker
RUN \
curl -sSL https://download.docker.com/linux/debian/gpg \
| gpg --dearmor --output /etc/apt/keyrings/docker.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian {{ include "os_release" "VERSION_CODENAME" }} stable" > /etc/apt/sources.list.d/docker.list \
--output /etc/apt/keyrings/docker.asc \
&& printf "Types: deb\n\
URIs: https://download.docker.com/linux/debian\n\
Suites: {{ include "os_release" "VERSION_CODENAME" }}\n\
Components: stable\n\
Signed-By: /etc/apt/keyrings/docker.asc\n\
" > /etc/apt/sources.list.d/docker.sources \
&& apt-get --quiet update \
&& apt-get --quiet --yes --no-install-recommends --verbose-versions install \
docker-ce-cli \
Expand Down
14 changes: 7 additions & 7 deletions lazy.ansible/test/.manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project:
system:
docker: true
goss:
version: 0.3.21
version: 0.4.2
apt:
packages:
- jq
Expand All @@ -19,17 +19,17 @@ system:
config: |
# Ssh config
ansible:
version: 2.14.3
version: 2.15.5
config: |
# Ansible config
dependencies:
- hvac==1.1.0
- hvac==1.2.1
ansible-lint:
version: 6.14.2
version: 6.14.6
dependencies:
- pytest==7.3.2
- pytest==7.4.2
molecule:
version: 5.0.1
dependencies:
- molecule-plugins==23.4.1
- molecule-plugins[docker]==23.4.1
- molecule-plugins==23.5.0
- molecule-plugins[docker]==23.5.0
24 changes: 19 additions & 5 deletions lazy.ansible/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,32 @@ user:
shell: /bin/bash

file:
# Base
/etc/os-release:
exists: true
contents:
- PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
# Git
/etc/gitconfig:
exists: true
contains:
- # Git config
contents:
- "# Git config template"
# Ssh
/etc/ssh/ssh_config:
/etc/ssh/ssh_config.d/ssh_config.conf:
exists: true
contains:
- # Ssh config
contents:
- "# Ssh config template"

command:
# Base
gosu --version:
exit-status: 0
stdout:
- "1.16"
gomplate --version:
exit-status: 0
stdout:
- gomplate version 3.11.5
# Goss
goss --version:
exit-status: 0
Expand Down
28 changes: 14 additions & 14 deletions lazy.kubernetes/.manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ system:
mount: []
docker: false
goss:
# @schema {"enum": [null, "0.4.0", "0.3.21"]}
# @schema {"enum": [null, "0.4.2", "0.3.23"]}
version: ~
apt:
# @schema {"items": {"type": "string"}}
Expand All @@ -50,11 +50,11 @@ system:
# @schema {"type": ["null", "string"]}
config: ~
kubectl:
# @schema {"enum": ["1.28.1", "1.27.5", "1.26.2", "1.25.7", "1.24.11", "1.23.17", "1.22.17", "1.21.14", "1.20.15"]}
# @schema {"enum": ["1.28.3", "1.27.7", "1.26.10", "1.25.15", "1.24.17", "1.23.17", "1.22.17", "1.21.14", "1.20.15"]}
# @option {"label": "Kubectl version"}
version: ~
helm:
# @schema {"enum": [null, "3.12.3", "3.11.2", "3.10.3", "3.9.4"]}
# @schema {"enum": [null, "3.13.1", "3.12.3", "3.11.3", "3.10.3", "3.9.4"]}
# @option {"label": "Helm version"}
version: ~
# @schema {
Expand All @@ -73,15 +73,15 @@ system:
# }
plugins: []
helmfile:
# @schema {"enum": [null, "0.156.0", "0.151.0"]}
# @schema {"enum": [null, "0.157.0", "0.156.0", "0.155.1"]}
# @option {"label": "Helmfile version"}
version: ~
k9s:
# @schema {"enum": [null, "0.27.3"]}
# @schema {"enum": [null, "0.27.4"]}
# @option {"label": "K9s version"}
version: ~
stern:
# @schema {"enum": [null, "1.23.0"]}
# @schema {"enum": [null, "1.26.0"]}
# @option {"label": "Stern version"}
version: ~
kube-prompt:
Expand All @@ -97,34 +97,34 @@ system:
# @option {"label": "Kubernetes namespace killer version"}
version: ~
vault:
# @schema {"enum": [null, "1.14.1", "1.13.0", "1.12.4", "1.11.8"]}
# @schema {"enum": [null, "1.15.0", "1.14.4", "1.13.8", "1.12.11"]}
# @option {"label": "Vault version"}
version: ~
rclone:
# @schema {"enum": [null, "1.61.1"]}
# @schema {"enum": [null, "1.64.1"]}
# @option {"label": "Rclone version"}
version: ~
openstack:
# @schema {"enum": [null, "6.2.0"]}
# @schema {"enum": [null, "6.3.0"]}
# @option {"label": "Openstack client version"}
version: ~
swift:
# @schema {"enum": [null, "4.2.0"]}
# @schema {"enum": [null, "4.4.0"]}
# @option {"label": "Swift client version"}
version: ~
keystone:
# @schema {"enum": [null, "5.1.0"]}
# @schema {"enum": [null, "5.2.0"]}
# @option {"label": "Swift keystone client version"}
version: ~
scw:
# @schema {"enum": [null, "2.19.0"]}
# @schema {"enum": [null, "2.23.0"]}
# @option {"label": "Scaleway cli version"}
version: ~
sops:
# @schema {"enum": [null, "3.7.3"]}
# @schema {"enum": [null, "3.8.1"]}
# @option {"label": "Sops version"}
version: ~
aws:
# @schema {"enum": [null, "2.13.3"]}
# @schema {"enum": [null, "2.13.27"]}
# @option {"label": "AWS cli version"}
version: ~
25 changes: 13 additions & 12 deletions lazy.kubernetes/.manala/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# Base #
########

FROM debian:bullseye-slim
FROM debian:bookworm-slim

ARG DEBIAN_FRONTEND="noninteractive"

ARG MANALA_USER_ID="1000"
ARG MANALA_GROUP_ID="1000"

ARG GOSU_VERSION="1.16"
ARG GOMPLATE_VERSION="3.11.4"
ARG GOMPLATE_VERSION="3.11.5"

# The 'container' environment variable tells systemd that it's running inside a
# Docker container environment.
Expand All @@ -20,9 +20,7 @@ ENV container="docker"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN \
# Backports
echo "deb http://deb.debian.org/debian {{ include "os_release" "VERSION_CODENAME" }}-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-get --quiet update \
apt-get --quiet update \
&& apt-get --quiet --yes --purge --autoremove upgrade \
&& apt-get --quiet --yes --no-install-recommends --verbose-versions install \
s6 \
Expand All @@ -38,12 +36,10 @@ RUN \
less \
vim \
socat \
# Apt keyrings (debian < bookworm)
&& mkdir --verbose --parents /etc/apt/keyrings \
# User
&& addgroup --gid ${MANALA_GROUP_ID} lazy \
&& adduser --home /home/lazy --shell /bin/bash --uid ${MANALA_USER_ID} --gecos lazy --ingroup lazy --disabled-password lazy \
&& mkdir --verbose --parents /run/user/${MANALA_USER_ID} && chown lazy:lazy /run/user/${MANALA_USER_ID} \
&& install --verbose --mode 0755 --group lazy --owner lazy --directory /run/user/${MANALA_USER_ID} \
&& echo "lazy ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/lazy \
# Gosu
&& curl -sSL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-{{ include "arch_map" (dict "amd64" "amd64" "arm64" "arm64") }}" \
Expand All @@ -54,7 +50,7 @@ RUN \
--output /usr/local/bin/gomplate \
&& chmod +x /usr/local/bin/gomplate \
# Bash completion
&& mkdir --verbose --parents /etc/bash_completion.d \
&& install --verbose --mode 0755 --directory /etc/bash_completion.d \
# Oh My Bash
&& git clone https://github.com/ohmybash/oh-my-bash.git /usr/local/share/oh-my-bash \
# Clean
Expand All @@ -80,7 +76,7 @@ RUN \
{{- end }}
{{- end }}
# Vim Gnupg
&& mkdir --verbose --parents /usr/share/vim/vimfiles/pack/plugins/start/vim-gnupg \
&& install --verbose --mode 0755 --directory /usr/share/vim/vimfiles/pack/plugins/start/vim-gnupg \
&& curl -sSL https://github.com/jamessan/vim-gnupg/releases/download/v${VIM_GNUPG_VERSION}/vim-gnupg-v${VIM_GNUPG_VERSION}.tar.gz \
| bsdtar -xvf - -C /usr/share/vim/vimfiles/pack/plugins/start/vim-gnupg --strip-components=1 vim-gnupg-${VIM_GNUPG_VERSION} \
&& echo "let g:GPGPreferSymmetric = 1" >> /etc/vim/vimrc \
Expand All @@ -91,8 +87,13 @@ RUN \
# Docker
RUN \
curl -sSL https://download.docker.com/linux/debian/gpg \
| gpg --dearmor --output /etc/apt/keyrings/docker.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian {{ include "os_release" "VERSION_CODENAME" }} stable" > /etc/apt/sources.list.d/docker.list \
--output /etc/apt/keyrings/docker.asc \
&& printf "Types: deb\n\
URIs: https://download.docker.com/linux/debian\n\
Suites: {{ include "os_release" "VERSION_CODENAME" }}\n\
Components: stable\n\
Signed-By: /etc/apt/keyrings/docker.asc\n\
" > /etc/apt/sources.list.d/docker.sources \
&& apt-get --quiet update \
&& apt-get --quiet --yes --no-install-recommends --verbose-versions install \
docker-ce-cli \
Expand Down
30 changes: 15 additions & 15 deletions lazy.kubernetes/test/.manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,45 @@ project:
system:
docker: true
goss:
version: 0.3.21
version: 0.4.2
apt:
packages:
- jq
git:
config: |
# Git config
kubectl:
version: 1.26.2
version: 1.28.3
helm:
version: 3.11.2
version: 3.13.1
plugins:
- url: https://github.com/databus23/helm-diff
version: 3.6.0
version: 3.8.1
helmfile:
version: 0.151.0
version: 0.157.0
k9s:
version: 0.27.3
version: 0.27.4
stern:
version: 1.23.0
version: 1.26.0
kube-prompt:
version: 1.0.11
popeye:
version: 0.11.1
knsk:
version: "1.0"
vault:
version: 1.13.0
version: 1.15.0
rclone:
version: 1.61.1
version: 1.64.1
openstack:
version: 6.2.0
version: 6.3.0
swift:
version: 4.2.0
version: 4.4.0
keystone:
version: 5.1.0
version: 5.2.0
scw:
version: 2.12.0
version: 2.23.0
sops:
version: 3.7.3
version: 3.8.1
aws:
version: 2.11.1
version: 2.13.27
Loading

0 comments on commit 88b9006

Please sign in to comment.