Skip to content

Commit f7ae133

Browse files
gregharveynfawbertDionisioFGdavids4David Suissa
authored
Bookworm upgrade pr devel (#165)
* Fix docker-compose v2 issue and re-release to include clamav role (#68) * Killing old ce-dev container when updating (#70) * Added Drupal9 and Localgov templates (#73) * New release 1.1.19 (#75) * Updated package.json version: 1.1.19 (#77) * Updated package.json version: 1.1.19 * New tag to fix repo key for Chrome (#83) * #CE-62820: Added support for composer '2.x' in Drupal 9 provision tem… (#89) (#91) * #CE-62820: Added support for composer '2.x' in Drupal 9 provision template. * #CE-62820: Attempt to fix pull request test cases by providing a default value for the 'new_user' in provision. * #CE-62820: Attempt to fix pull request test cases by providing a default value for the 'key_name' in provision. * #CE-62820: Attempt to fix pull request test cases by providing a default values for 'ce_deploy' in provision. Co-authored-by: David Suissa <[email protected]> Co-authored-by: David Suissa <[email protected]> * REL 1.1.21: Using composer 2 with Drupal 9 by default (#92) * Drupal template fixes pr 1.x (#94) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * CE-DEV: some updates and tweaks (#96) * Renamed the settings and drush files for ce-dev * Added nodejs 16.x as default version * Added lhci_run role by default * Some tweaks in the config * Added the if statement to read info from an optional settings.local.php file * Release 1.1.23 (#97) * Bump minimist from 1.2.5 to 1.2.6 (#79) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ansi-regex from 3.0.0 to 3.0.1 (#84) Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](chalk/ansi-regex@v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump moment from 2.27.0 to 2.29.4 (#85) Bumps [moment](https://github.com/moment/moment) from 2.27.0 to 2.29.4. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](moment/moment@2.27.0...2.29.4) --- updated-dependencies: - dependency-name: moment dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Changing 'set-current' choice to a valid one. * Fixing ce_provision vars in container builds. (#102) * Adding variables pr 1.x (#104) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding variables pr 1.x (#106) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. * Adding variables pr 1.x (#109) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. * Still missing some vars. * Adding variables pr 1.x (#111) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. * Still missing some vars. * Setting older version of Ubuntu for containers. * Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' parameter. * Bump minimatch from 3.0.4 to 3.1.2 (#107) Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Cgroup fixes pr 1.x (#115) * Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' parameter. * Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' parameter. (#113) * Documentation update for docker composer v2. * Temporarily disabling LHCI for Drupal 9 due to an HTML issue. * Preparing release of 1.2.0. * Updating release version in package.json. * Updating yarn dependencies. * Committing package-lock.json (new file with newer node versions). * Revert "Committing package-lock.json (new file with newer node versions)." This reverts commit 8912d3d. * Revert "Updating yarn dependencies." This reverts commit 94be4ab. --------- Co-authored-by: Kristjan Lilleoja <[email protected]> Co-authored-by: Kristjan Lilleoja <[email protected]> * Adding new required ce-provision rkhunter variable. (#119) * Issue 120: docker ps change, can no longer use --format *and* --quiet. (#122) * REL 1.2.1: Fix --quiet and --format use (#123) * Drupal template fixes pr 1.x (#126) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Updating Drupal templates. * Removing docs steps for ansible because they cannot work. * Suppressing unattended-upgrades. * Adding composer plugins to Drupal 8 deployments. * Adding the phpcodesniffer plugin for D8. * Bump semver from 5.7.1 to 5.7.2 (#124) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Bump semver from 5.7.1 to 5.7.2 Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md) - [Commits](npm/node-semver@v5.7.1...v5.7.2) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Updating Drupal templates. * Removing docs steps for ansible because they cannot work. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: gregharvey <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Updating docs URL for CI to https. (#131) * Drupal template fixes pr 1.x (#133) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Updating Drupal templates. * Removing docs steps for ansible because they cannot work. * Suppressing unattended-upgrades. * Adding composer plugins to Drupal 8 deployments. * Adding the phpcodesniffer plugin for D8. * Updating PHP versions for templates. * Drupal template fixes pr 1.x (#135) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Updating Drupal templates. * Removing docs steps for ansible because they cannot work. * Suppressing unattended-upgrades. * Adding composer plugins to Drupal 8 deployments. * Adding the phpcodesniffer plugin for D8. * Updating PHP versions for templates. * Downgrading Drupal and drush for LGD. * Drupal template fixes pr 1.x (#138) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Updating Drupal templates. * Removing docs steps for ansible because they cannot work. * Suppressing unattended-upgrades. * Adding composer plugins to Drupal 8 deployments. * Adding the phpcodesniffer plugin for D8. * Updating PHP versions for templates. * Downgrading Drupal and drush for LGD. * LGD prebuilt template needs to use drupal9 images. * Packaging 1.2.2 with new Drupal templates. * Drupal template fixes pr 1.x (#140) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Updating Drupal templates. * Removing docs steps for ansible because they cannot work. * Suppressing unattended-upgrades. * Adding composer plugins to Drupal 8 deployments. * Adding the phpcodesniffer plugin for D8. * Updating PHP versions for templates. * Downgrading Drupal and drush for LGD. * LGD prebuilt template needs to use drupal9 images. * Adding another composer plugin for LGD template builds. * Upgrading base container to bullseye-slim. (#141) * Adding release info. * 66912: Added Drupal10 template (#144) * 66912: Added Drupal10 template * 66912: Added post_tasks section * 66912: Updated version to 1.2.4 * 66912: Recovered drupal8 * 66912: Fixed drupal10 text * Bump word-wrap from 1.2.3 to 1.2.4 (#136) Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Troubleshooting.md to include more information around cgroup. (#145) * Bump debug from 4.1.1 to 4.3.4 (#146) Bumps [debug](https://github.com/debug-js/debug) from 4.1.1 to 4.3.4. - [Release notes](https://github.com/debug-js/debug/releases) - [Commits](debug-js/debug@4.1.1...4.3.4) --- updated-dependencies: - dependency-name: debug dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * #60168: Documentation: Updated Troubleshooting information for 'Ubuntu:22.x'. (#99) Co-authored-by: David Suissa <[email protected]> Co-authored-by: gregharvey <[email protected]> * Bullseye upgrade pr 1.x (#147) * Upgrading base container to bullseye-slim. * Noticed some extra references to buster. * Adding build for testing images from devel. (#149) * Creating devel containers with Debian 'bookworm' (12). * Moving ansible and boto3 installs to apt. * apt installed ansible is not in /usr/local. * Updating dependencies. * Updating yarn.lock again. * Fixing ansible paths for ce-provision 2.x. * Adding new variables required by controller. * Installing ansible in a virtual environment on the container before running ce-provision. * Missing a slash! * Also missed a &&. * Adding python venv support via apt in base image. * Temporarily adding python3-venv to the controller Dockerfile. * Installing Ansible as the ce-dev user to avoid perms issues. * Upgrading ubuntu in CI to have systemd as default and disabling Ansible upgrades. * Missing an ansible install var. * Documentation for testing containers. * Adding vscode settings to .gitignore. * Adding devel versions of Dockerfiles and config. * Fixing bug caused by set line. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: nfawbert <[email protected]> Co-authored-by: Dionisio <[email protected]> Co-authored-by: davids4 <[email protected]> Co-authored-by: David Suissa <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kristjan Lilleoja <[email protected]> Co-authored-by: Kristjan Lilleoja <[email protected]> Co-authored-by: Dan Smith <[email protected]> Co-authored-by: Philip Norton <[email protected]>
1 parent 716fef2 commit f7ae133

File tree

14 files changed

+354
-34
lines changed

14 files changed

+354
-34
lines changed

.github/workflows/ce-dev-PR-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ jobs:
3030
rm -Rf mkcert
3131
- name: Build and test
3232
run: |
33-
/bin/sh docker-images/export.sh latest
33+
/bin/sh docker-images/export.sh --version latest --image-name ce-dev
34+
/bin/sh docker-images/export.sh --version latest --image-name ce-dev-controller
3435
/bin/sh templates/prebuild.sh

.github/workflows/ce-dev-build-dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ jobs:
3939
- name: Build and push Docker images
4040
run: |
4141
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
42-
/bin/sh docker-images/export.sh devel --push
42+
/bin/sh docker-images/export.sh --version devel --image-name ce-dev --base-image debian:bookworm-slim --dockerfile-path base-devel --push
43+
/bin/sh docker-images/export.sh --version devel --image-name ce-dev-controller --base-image debian:bookworm-slim --dockerfile-path controller-devel --push

.github/workflows/ce-dev-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ jobs:
3434
rm -Rf mkcert
3535
- name: Build and test
3636
run: |
37-
/bin/sh docker-images/export.sh latest
37+
/bin/sh docker-images/export.sh --version latest --image-name ce-dev
38+
/bin/sh docker-images/export.sh --version latest --image-name ce-dev-controller
3839
/bin/sh templates/prebuild.sh

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ lib
66
tmp
77
node_modules
88
oclif.manifest.json
9+
.vscode/*

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

docker-images/base-devel/Dockerfile

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
FROM debian:bookworm-slim as unison
2+
RUN \
3+
set -x && \
4+
export DEBIAN_FRONTEND=noninteractive && \
5+
apt-get update && \
6+
apt-get install -y -o Dpkg::Options::="--force-confnew" \
7+
p7zip-full \
8+
build-essential \
9+
wget \
10+
ocaml-native-compilers && \
11+
cd /tmp/ && \
12+
wget https://github.com/bcpierce00/unison/archive/v2.53.3.tar.gz && \
13+
tar -xzvf v2.53.3.tar.gz && \
14+
cd /tmp/unison-2.53.3 && \
15+
make
16+
17+
FROM unison
18+
19+
RUN \
20+
set -x && \
21+
export DEBIAN_FRONTEND=noninteractive && \
22+
apt-get update && \
23+
apt-get dist-upgrade -y -o Dpkg::Options::="--force-confnew" && \
24+
apt-get install -y -o Dpkg::Options::="--force-confnew" \
25+
anacron \
26+
apt-transport-https \
27+
apt-utils \
28+
aptitude \
29+
bash \
30+
binutils \
31+
cron \
32+
curl \
33+
dirmngr \
34+
gnupg \
35+
rsync \
36+
openssh-server \
37+
postfix \
38+
procmail \
39+
python3-apt \
40+
python3-dev \
41+
python3-pycurl \
42+
python3-pip \
43+
python3-venv \
44+
rsyslog \
45+
sudo \
46+
systemd \
47+
systemd-sysv \
48+
unzip \
49+
vim \
50+
wget && \
51+
apt-get clean && \
52+
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
53+
rm -rf \
54+
/var/lib/apt/lists/* \
55+
/var/log/* \
56+
/tmp/*
57+
58+
RUN \
59+
echo 'UseDNS no' >> /etc/ssh/sshd_config && \
60+
mkdir -p /var/run/sshd && \
61+
rm /usr/sbin/policy-rc.d
62+
63+
RUN \
64+
set -x && \
65+
export DEBIAN_FRONTEND=noninteractive && \
66+
useradd -s /bin/bash ce-dev && \
67+
echo ce-dev:ce-dev | chpasswd -m && \
68+
install -m 755 -o ce-dev -g ce-dev -d /home/ce-dev && \
69+
install -m 700 -o ce-dev -g ce-dev -d /home/ce-dev/.ssh && \
70+
echo root:ce-dev | chpasswd -m && \
71+
echo 'ce-dev ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/ce-dev && \
72+
chmod 0440 /etc/sudoers.d/ce-dev && \
73+
rm -rf /tmp/*
74+
75+
RUN \
76+
rm -f \
77+
/etc/machine-id \
78+
/var/lib/dbus/machine-id
79+
80+
COPY --from=unison /tmp/unison-2.53.3/src/unison /usr/local/bin/
81+
COPY --from=unison /tmp/unison-2.53.3/src/unison-fsmonitor /usr/local/bin/
82+
COPY ./ce-dev-ownership.sh /opt/
83+
COPY ./ce-dev-ssh.sh /opt/
84+
COPY ./unison.sh /opt/
85+
COPY ./unison-startup.sh /opt/
86+
COPY ./procmailrc /etc/procmailrc
87+
88+
RUN \
89+
wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 -O /usr/local/bin/mkcert && \
90+
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 && \
91+
chown -R ce-dev:ce-dev /home/ce-dev && \
92+
chmod +x /usr/local/bin/*
93+
94+
RUN \
95+
systemctl mask -- \
96+
dev-hugepages.mount \
97+
sys-fs-fuse-connections.mount
98+
99+
ENV container docker
100+
STOPSIGNAL SIGRTMIN+3
101+
VOLUME [ "/sys/fs/cgroup", "/run", "/run/lock", "/tmp" ]
102+
103+
ENTRYPOINT ["/sbin/init"]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
# Ensure user numeric uid/gid matches.
4+
# @param $1
5+
# User id.
6+
# @param $2
7+
# Group id.
8+
ensure_user_ids(){
9+
OLD_UID="$(id -u ce-dev)"
10+
OLD_GID="$(id -g ce-dev)"
11+
if [ "$OLD_UID" = "$1" ] && [ "$OLD_GID" = "$2" ]; then
12+
return
13+
fi
14+
if [ "$OLD_UID" != "$1" ]; then
15+
usermod -u "$1" ce-dev
16+
chown -R --from="$OLD_UID" "$1" /var
17+
echo "User ID changed to $1."
18+
fi
19+
if [ "$OLD_GID" != "$2" ]; then
20+
groupmod -g "$2" ce-dev
21+
chown -R --from=":$OLD_GID" ":$2" /var
22+
echo "Group ID changed to $2."
23+
fi
24+
if [ -d /.x-ce-dev ]; then
25+
chown -R ce-dev:ce-dev /.x-ce-dev
26+
fi
27+
chown -R ce-dev:ce-dev /home/ce-dev
28+
}
29+
30+
# Match ids with host user.
31+
if [ -n "$1" ] && [ -n "$2" ]; then
32+
ensure_user_ids "$1" "$2"
33+
fi
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
# Generate ssh key pair.
4+
ensure_ssh_key(){
5+
rm -rf /home/ce-dev/.ssh/*
6+
ssh-keygen -t rsa -b 4096 -N "" -f /home/ce-dev/.ssh/id_rsa
7+
cp /home/ce-dev/.ssh/id_rsa.pub /home/ce-dev/.ssh/authorized_keys
8+
touch /home/ce-dev/.ssh/config
9+
chmod 600 /home/ce-dev/.ssh/id_rsa
10+
chmod 600 /home/ce-dev/.ssh/id_rsa.pub
11+
chmod 600 /home/ce-dev/.ssh/authorized_keys
12+
chown -R ce-dev:ce-dev /home/ce-dev/.ssh
13+
}
14+
15+
ensure_ssh_key

docker-images/base-devel/procmailrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ORGMAIL=/dev/null
2+
DEFAULT=${ORGMAIL}
3+
MAILDIR=${ORGMAIL}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
nohup /bin/sh /opt/unison.sh "$@" </dev/null >/dev/null 2>&1 &

0 commit comments

Comments
 (0)