Skip to content

Bookworm upgrade pr devel #165

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 98 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
5bee26c
Fix docker-compose v2 issue and re-release to include clamav role (#68)
nfawbert Jan 28, 2022
e42ebd1
Killing old ce-dev container when updating (#70)
nfawbert Feb 2, 2022
b0dc9d9
Added Drupal9 and Localgov templates (#73)
DionisioFG Mar 9, 2022
34ce84c
New release 1.1.19 (#75)
DionisioFG Mar 10, 2022
cae50ba
Updated package.json version: 1.1.19 (#77)
DionisioFG Mar 10, 2022
79372e7
New tag to fix repo key for Chrome (#83)
DionisioFG Jul 1, 2022
4fa738c
#CE-62820: Added support for composer '2.x' in Drupal 9 provision tem…
davids4 Sep 8, 2022
70954a3
REL 1.1.21: Using composer 2 with Drupal 9 by default (#92)
DionisioFG Sep 8, 2022
62e753e
Drupal template fixes pr 1.x (#94)
gregharvey Sep 9, 2022
710a4e3
CE-DEV: some updates and tweaks (#96)
DionisioFG Sep 14, 2022
6046092
Release 1.1.23 (#97)
DionisioFG Sep 14, 2022
2dc8b59
Bump minimist from 1.2.5 to 1.2.6 (#79)
dependabot[bot] Sep 15, 2022
dd597b8
Bump ansi-regex from 3.0.0 to 3.0.1 (#84)
dependabot[bot] Sep 15, 2022
4f0e659
Bump moment from 2.27.0 to 2.29.4 (#85)
dependabot[bot] Sep 15, 2022
2dc648c
Changing 'set-current' choice to a valid one.
gregharvey Sep 15, 2022
8434c0d
Fixing ce_provision vars in container builds. (#102)
gregharvey Apr 14, 2023
0581ade
Adding variables pr 1.x (#104)
gregharvey Apr 14, 2023
fdc01d0
Adding variables pr 1.x (#106)
gregharvey Apr 14, 2023
dd3d9fc
Adding variables pr 1.x (#109)
gregharvey Apr 14, 2023
cd1345b
Adding variables pr 1.x (#111)
gregharvey Apr 14, 2023
7c9e1bc
Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' param…
iKristjan May 17, 2023
2c8d2ff
Bump minimatch from 3.0.4 to 3.1.2 (#107)
dependabot[bot] May 18, 2023
8325116
Merge branch '1.x' of github.com:codeenigma/ce-dev into 1.x
gregharvey May 18, 2023
c884a4f
Cgroup fixes pr 1.x (#115)
gregharvey May 18, 2023
d4b8b37
Merge branch '1.x' of github.com:codeenigma/ce-dev into 1.x
gregharvey May 18, 2023
6578ae9
Adding new required ce-provision rkhunter variable. (#119)
gregharvey May 22, 2023
fd04f9c
Issue 120: docker ps change, can no longer use --format *and* --quiet…
galooph Jul 10, 2023
0d25cfe
REL 1.2.1: Fix --quiet and --format use (#123)
DionisioFG Jul 10, 2023
6ddcb4d
Drupal template fixes pr 1.x (#126)
gregharvey Jul 18, 2023
45cdf89
Bump semver from 5.7.1 to 5.7.2 (#124)
dependabot[bot] Jul 18, 2023
f347208
Updating docs URL for CI to https. (#131)
gregharvey Jul 18, 2023
9e6df79
Drupal template fixes pr 1.x (#133)
gregharvey Jul 18, 2023
2746cd5
Drupal template fixes pr 1.x (#135)
gregharvey Jul 18, 2023
06bf830
Drupal template fixes pr 1.x (#138)
gregharvey Jul 19, 2023
0ae2dc6
Packaging 1.2.2 with new Drupal templates.
gregharvey Jul 19, 2023
57de3cd
Drupal template fixes pr 1.x (#140)
gregharvey Jul 19, 2023
6e51555
Upgrading base container to bullseye-slim. (#141)
gregharvey Jul 20, 2023
c56b900
Adding release info.
gregharvey Jul 20, 2023
845c62f
66912: Added Drupal10 template (#144)
DionisioFG Aug 29, 2023
a45f96f
Bump word-wrap from 1.2.3 to 1.2.4 (#136)
dependabot[bot] Oct 25, 2023
6f89931
Update Troubleshooting.md to include more information around cgroup. …
philipnorton42 Oct 25, 2023
dc14dbd
Bump debug from 4.1.1 to 4.3.4 (#146)
dependabot[bot] Oct 25, 2023
bf4fd05
#60168: Documentation: Updated Troubleshooting information for 'Ubunt…
davids4 Oct 25, 2023
a5ace2c
Bullseye upgrade pr 1.x (#147)
gregharvey Nov 8, 2023
cb72b14
Adding build for testing images from devel. (#149)
gregharvey Nov 8, 2023
81a95c6
Creating devel containers with Debian 'bookworm' (12).
gregharvey Nov 8, 2023
c875314
Merging devel.
gregharvey Nov 8, 2023
756186a
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 8, 2023
9b0d2fc
Moving ansible and boto3 installs to apt.
gregharvey Nov 8, 2023
8dcf5a3
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 8, 2023
0564fcf
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 8, 2023
e035a89
apt installed ansible is not in /usr/local.
gregharvey Nov 8, 2023
ce0b98b
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 8, 2023
cd13af2
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 8, 2023
cfa368e
Updating dependencies.
gregharvey Nov 10, 2023
9768952
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
427c538
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
3a48a59
Updating yarn.lock again.
gregharvey Nov 10, 2023
ae49b6b
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
dc3d58d
Fixing ansible paths for ce-provision 2.x.
gregharvey Nov 10, 2023
6d01a12
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
63e800d
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
1a9807e
Adding new variables required by controller.
gregharvey Nov 10, 2023
e3bafc3
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
a18ef25
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
c30464c
Installing ansible in a virtual environment on the container before r…
gregharvey Nov 10, 2023
4b3609b
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
217c47e
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
d3216b9
Missing a slash!
gregharvey Nov 10, 2023
f2bdf73
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
6e8c00d
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
f54182c
Also missed a &&.
gregharvey Nov 10, 2023
437ed87
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
a04089a
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
f36f660
Adding python venv support via apt in base image.
gregharvey Nov 10, 2023
93e19de
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
9e36199
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
4e80238
Temporarily adding python3-venv to the controller Dockerfile.
gregharvey Nov 10, 2023
e8c0dc8
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
a9cb6dc
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
fd6867d
Installing Ansible as the ce-dev user to avoid perms issues.
gregharvey Nov 10, 2023
28b85de
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
be95ffa
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 10, 2023
4db5392
Upgrading ubuntu in CI to have systemd as default and disabling Ansib…
gregharvey Nov 13, 2023
403c80d
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 13, 2023
9c14cfd
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 13, 2023
5561b76
Missing an ansible install var.
gregharvey Nov 13, 2023
f000358
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 13, 2023
b5be37d
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 13, 2023
154e76e
Documentation for testing containers.
gregharvey Nov 13, 2023
8e27203
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Nov 13, 2023
f76300a
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Nov 13, 2023
d750a8d
Adding vscode settings to .gitignore.
gregharvey Jan 25, 2024
9a4cff3
Adding devel versions of Dockerfiles and config.
gregharvey Jan 25, 2024
40c481c
Merge branch 'devel' into bookworm_upgrade-PR-devel
gregharvey Jan 25, 2024
c54491d
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Jan 25, 2024
f625a9e
Fixing bug caused by set line.
gregharvey Jan 25, 2024
4d12853
Merge branch 'bookworm_upgrade' into bookworm_upgrade-PR-devel
gregharvey Jan 25, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/ce-dev-PR-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ jobs:
rm -Rf mkcert
- name: Build and test
run: |
/bin/sh docker-images/export.sh latest
/bin/sh docker-images/export.sh --version latest --image-name ce-dev
/bin/sh docker-images/export.sh --version latest --image-name ce-dev-controller
/bin/sh templates/prebuild.sh
3 changes: 2 additions & 1 deletion .github/workflows/ce-dev-build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ jobs:
- name: Build and push Docker images
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
/bin/sh docker-images/export.sh devel --push
/bin/sh docker-images/export.sh --version devel --image-name ce-dev --base-image debian:bookworm-slim --dockerfile-path base-devel --push
/bin/sh docker-images/export.sh --version devel --image-name ce-dev-controller --base-image debian:bookworm-slim --dockerfile-path controller-devel --push
3 changes: 2 additions & 1 deletion .github/workflows/ce-dev-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ jobs:
rm -Rf mkcert
- name: Build and test
run: |
/bin/sh docker-images/export.sh latest
/bin/sh docker-images/export.sh --version latest --image-name ce-dev
/bin/sh docker-images/export.sh --version latest --image-name ce-dev-controller
/bin/sh templates/prebuild.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ lib
tmp
node_modules
oclif.manifest.json
.vscode/*
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

103 changes: 103 additions & 0 deletions docker-images/base-devel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
FROM debian:bookworm-slim as unison
RUN \
set -x && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y -o Dpkg::Options::="--force-confnew" \
p7zip-full \
build-essential \
wget \
ocaml-native-compilers && \
cd /tmp/ && \
wget https://github.com/bcpierce00/unison/archive/v2.53.3.tar.gz && \
tar -xzvf v2.53.3.tar.gz && \
cd /tmp/unison-2.53.3 && \
make

FROM unison

RUN \
set -x && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get dist-upgrade -y -o Dpkg::Options::="--force-confnew" && \
apt-get install -y -o Dpkg::Options::="--force-confnew" \
anacron \
apt-transport-https \
apt-utils \
aptitude \
bash \
binutils \
cron \
curl \
dirmngr \
gnupg \
rsync \
openssh-server \
postfix \
procmail \
python3-apt \
python3-dev \
python3-pycurl \
python3-pip \
python3-venv \
rsyslog \
sudo \
systemd \
systemd-sysv \
unzip \
vim \
wget && \
apt-get clean && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
rm -rf \
/var/lib/apt/lists/* \
/var/log/* \
/tmp/*

RUN \
echo 'UseDNS no' >> /etc/ssh/sshd_config && \
mkdir -p /var/run/sshd && \
rm /usr/sbin/policy-rc.d

RUN \
set -x && \
export DEBIAN_FRONTEND=noninteractive && \
useradd -s /bin/bash ce-dev && \
echo ce-dev:ce-dev | chpasswd -m && \
install -m 755 -o ce-dev -g ce-dev -d /home/ce-dev && \
install -m 700 -o ce-dev -g ce-dev -d /home/ce-dev/.ssh && \
echo root:ce-dev | chpasswd -m && \
echo 'ce-dev ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/ce-dev && \
chmod 0440 /etc/sudoers.d/ce-dev && \
rm -rf /tmp/*

RUN \
rm -f \
/etc/machine-id \
/var/lib/dbus/machine-id

COPY --from=unison /tmp/unison-2.53.3/src/unison /usr/local/bin/
COPY --from=unison /tmp/unison-2.53.3/src/unison-fsmonitor /usr/local/bin/
COPY ./ce-dev-ownership.sh /opt/
COPY ./ce-dev-ssh.sh /opt/
COPY ./unison.sh /opt/
COPY ./unison-startup.sh /opt/
COPY ./procmailrc /etc/procmailrc

RUN \
wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 -O /usr/local/bin/mkcert && \
mkdir -p /home/ce-dev/deploy/live.local /home/ce-dev/.composer/cache /home/ce-dev/.nvm/versions/node /home/ce-dev/.local/share/mkcert && \
chown -R ce-dev:ce-dev /home/ce-dev && \
chmod +x /usr/local/bin/*

RUN \
systemctl mask -- \
dev-hugepages.mount \
sys-fs-fuse-connections.mount

ENV container docker
STOPSIGNAL SIGRTMIN+3
VOLUME [ "/sys/fs/cgroup", "/run", "/run/lock", "/tmp" ]

ENTRYPOINT ["/sbin/init"]
33 changes: 33 additions & 0 deletions docker-images/base-devel/ce-dev-ownership.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh

# Ensure user numeric uid/gid matches.
# @param $1
# User id.
# @param $2
# Group id.
ensure_user_ids(){
OLD_UID="$(id -u ce-dev)"
OLD_GID="$(id -g ce-dev)"
if [ "$OLD_UID" = "$1" ] && [ "$OLD_GID" = "$2" ]; then
return
fi
if [ "$OLD_UID" != "$1" ]; then
usermod -u "$1" ce-dev
chown -R --from="$OLD_UID" "$1" /var
echo "User ID changed to $1."
fi
if [ "$OLD_GID" != "$2" ]; then
groupmod -g "$2" ce-dev
chown -R --from=":$OLD_GID" ":$2" /var
echo "Group ID changed to $2."
fi
if [ -d /.x-ce-dev ]; then
chown -R ce-dev:ce-dev /.x-ce-dev
fi
chown -R ce-dev:ce-dev /home/ce-dev
}

# Match ids with host user.
if [ -n "$1" ] && [ -n "$2" ]; then
ensure_user_ids "$1" "$2"
fi
15 changes: 15 additions & 0 deletions docker-images/base-devel/ce-dev-ssh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# Generate ssh key pair.
ensure_ssh_key(){
rm -rf /home/ce-dev/.ssh/*
ssh-keygen -t rsa -b 4096 -N "" -f /home/ce-dev/.ssh/id_rsa
cp /home/ce-dev/.ssh/id_rsa.pub /home/ce-dev/.ssh/authorized_keys
touch /home/ce-dev/.ssh/config
chmod 600 /home/ce-dev/.ssh/id_rsa
chmod 600 /home/ce-dev/.ssh/id_rsa.pub
chmod 600 /home/ce-dev/.ssh/authorized_keys
chown -R ce-dev:ce-dev /home/ce-dev/.ssh
}

ensure_ssh_key
3 changes: 3 additions & 0 deletions docker-images/base-devel/procmailrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ORGMAIL=/dev/null
DEFAULT=${ORGMAIL}
MAILDIR=${ORGMAIL}
3 changes: 3 additions & 0 deletions docker-images/base-devel/unison-startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

nohup /bin/sh /opt/unison.sh "$@" </dev/null >/dev/null 2>&1 &
6 changes: 6 additions & 0 deletions docker-images/base-devel/unison.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

mkdir -p "/tmp/$1"
while true; do
flock -w 30 /tmp"$1"/unison.lock /usr/local/bin/unison -copythreshold 100000 -owner -group -batch -repeat watch -fastercheckUNSAFE -prefer "$1" "$@" || exit 1
done
34 changes: 34 additions & 0 deletions docker-images/controller-devel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM codeenigma/ce-dev-1.x:devel

RUN \
set -x && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get dist-upgrade -y -o Dpkg::Options::="--force-confnew" && \
apt-get install -y -o Dpkg::Options::="--force-confnew" \
git \
python3-venv \
python3-boto3 && \
apt-get clean && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
rm -rf \
/var/lib/apt/lists/* \
/var/log/* \
/tmp/*


RUN su - ce-dev -c "git clone --branch 2.x https://github.com/codeenigma/ce-provision.git /home/ce-dev/ce-provision"

COPY ./provision.yml /home/ce-dev/ce-provision/provision.yml

RUN \
set -x && \
export DEBIAN_FRONTEND=noninteractive && \
su - ce-dev -c "/usr/bin/python3 -m venv /home/ce-dev/ansible" && \
su - ce-dev -c "/home/ce-dev/ansible/bin/python3 -m pip install ansible"

RUN \
set -x && \
export DEBIAN_FRONTEND=noninteractive && \
su - ce-dev -c "/home/ce-dev/ansible/bin/ansible-playbook /home/ce-dev/ce-provision/provision.yml" && \
rm /home/ce-dev/ce-provision/provision.yml
64 changes: 64 additions & 0 deletions docker-images/controller-devel/provision.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
- hosts: localhost
become: true
vars:
- _domain_name: example.com
- _ce_provision_build_tmp_dir: /tmp
- _ce_provision_data_dir: /tmp
- _ce_provision:
username: ce-dev
- is_local: true
- _env_type: utility
- ce_deploy:
venv_path: "/home/{{ _ce_provision.username }}/ansible"
venv_command: /usr/bin/python3 -m venv
install_username: "{{ _ce_provision.username }}"
upgrade_timer_name: upgrade_ce_deploy_ansible
own_repository: https://github.com/codeenigma/ce-deploy.git
config_repository: https://github.com/codeenigma/ce-dev-ce-deploy-config.git
own_repository_branch: 1.x
config_repository_branch: 1.x
username: ce-dev
new_user: true
key_name: id_rsa.pub
local_dir: /home/ce-dev/ce-deploy
ce_provision_dir: "/home/ce-dev/ce-provision"
groups: []
galaxy_custom_requirements_file: ""
upgrade_galaxy:
enabled: false
- ce_provision:
venv_path: "/home/{{ _ce_provision.username }}/ansible"
venv_command: /usr/bin/python3 -m venv
install_username: "{{ _ce_provision.username }}"
upgrade_timer_name: upgrade_ce_provision_ansible
own_repository: https://github.com/codeenigma/ce-provision.git
own_repository_branch: 2.x
own_repository_skip_checkout: false
config_repository: https://github.com/codeenigma/ce-dev-ce-provision-config.git
config_repository_branch: 1.x
config_repository_skip_checkout: false
username: ce-dev
new_user: true
key_name: id_rsa.pub
local_dir: /home/ce-dev/ce-provision
groups: []
contrib_roles:
- directory: wazuh
repo: https://github.com/wazuh/wazuh-ansible.git
branch: stable
- directory: systemd_timers
repo: https://github.com/vlcty/ansible-systemd-timers.git
branch: master
galaxy_custom_requirements_file: ""
galaxy_roles_directory: "/home/{{ _ce_provision.username }}/.ansible/roles"
upgrade_galaxy:
enabled: false
- ce_ansible:
upgrade:
enabled: false
linters:
enabled: true
roles:
- debian/ce_provision
- debian/ce_deploy
Loading