Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 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
6dbf2bb
Adding build for testing images from devel.
gregharvey Nov 8, 2023
cb2caae
Merging devel.
gregharvey Nov 8, 2023
d06dfbc
Merge branch 'test_images' into test_images-PR-devel
gregharvey Nov 8, 2023
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
42 changes: 42 additions & 0 deletions .github/workflows/ce-dev-build-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build the devel ce-dev base and controller images

# Run this workflow only on a push/merged PR to branch devel
on:
push:
branches:
- devel

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
# Uses https://oclif.io/
- name: Pack the JS
run: yarn oclif-dev pack
# We build mkcert from source because releases are broken
# The last step sets ce-dev config to NOT use sudo because this causes docker image push problems
- name: Install build and publish dependencies
run: |
sudo apt-get update
sudo apt-get install -y p7zip-full libnss3-tools wget
cd /tmp
wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
mkdir -p ~/.config/ce-dev
touch ~/.config/ce-dev/preferences-1.x.yml
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-1.x.yml
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-1.x.yml
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-1.x.yml
- 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
6 changes: 3 additions & 3 deletions docker-images/export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
OWN_DIR=$( cd "$( dirname "$OWN" )" && pwd -P)

# Ensure we have a fresh image to start with.
docker image pull debian:buster
docker image pull debian:bullseye-slim

# Build base image.
echo "Building base image."
Expand All @@ -45,8 +45,8 @@ if [ "$2" = "--push" ]; then
docker image push "codeenigma/ce-dev-controller-1.x:$1"
fi

# Build dind image.
# echo "Building dind image"
# Build DinD (Docker in Docker) image.
# echo "Building DinD image"
# sudo docker image build --compress "--label=ce-dev-dind-1.x:$1" --no-cache=true -t "codeenigma/ce-dev-dind-1.x:$1" "$OWN_DIR/dind" || exit 1
# if [ "$2" = "--push" ]; then
# echo "Publishing the image with docker image push codeenigma/ce-dev-dind-1.x:$1"
Expand Down
65 changes: 59 additions & 6 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,97 @@ If your files are not updating you should check the [maximum permitted `inotify`
The way some editors behave on save means the inumber of the file does not change, so unison does not pick up a difference and the files in your containers do not update. Notable culprits are `vim` and `Atom`. In both cases there are fixes - for example the `local-history` plugin for `Atom` forces it to behave as we need. If you have mysterious issues with files not changing in your containers and it isn't the `inotify` watcher limit above, check how your editor behaves.

## Cgroup Issues

If your ce-dev is failing to even start the controller then you'll see a response that looks like this.
```

```bash
Creating ce_dev_controller ... done
Ensure user UID match those on the host...
Ensure user UID match those on the host... !
Error: Command failed: sudo docker exec ce_dev_controller /bin/sh /opt/ce-dev-ownership.sh 1000 1000
```

There will be very little in the way of logs or errors from this. Just an indication of a problem.

### Ubuntu 21.x

It turns out that if you are using Ubuntu 21.10 (or POP! OS) then it will be using kernelstub and not grub. This might create incompatabilities between docker and cgroup version 2. To fix this you need to run the following commands.

```
sudo kernelstub -a "systemd.unified_cgroup_hierarchy=0"
```bash
sudo kernelstub -a "systemd.unified_cgroup_hierarchy=0"
sudo update-initramfs -c -k all
```

They will take a while to run (about 10 minutes), but once complete reboot your machine and delete any created containers that velong to the ce_dev image. When you rebuild the ce-dev controller (by running any command) it should create fine.

Another way for changing the system settings for cgroups is addind the option to the boot loader. In case you use grub with a distribution that uses the new cgroups version you can add this line into the file */etc/default/grub*
```

```bash
GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0"
```

More information about adding parameters to the kernel if you're using other boot loader can be found at https://wiki.archlinux.org/title/kernel_parameters

### Ubuntu 22.x

The resolution steps are similar to the ones above for `Ubuntu:21.x`, except that `Ubuntu:22.x` doesn't use `kernelstub`, so the changes have to be made in the grub file instead:

1 - Edit the grub file in your editor of choice.

```bash
sudo vi /etc/default/grub
```

2 - Modify the line for `GRUB_CMDLINE_LINUX_DEFAULT`, with the following value:

```bash
GRUB_CMDLINE_LINUX_DEFAULT="systemd.unified_cgroup_hierarchy=0 quiet splash"
```

3 - Force a refresh of the system grub and an update of `initramfs` images:

```bash
sudo update-grub
sudo update-initramfs -c -k all
```

4 - Lastly, ensure all existing containers are removed:

```bash
docker rm $(docker ps -aq)
```

### Cgroup On Older Projects

ce-dev does allow for the use of Cgroup 2, but some older projects will need upgrading to allow this to work. This means that the ce-dev controller will work fine, but some projects may fail to start some containers. This error will become apparent if you see the "unreachable" error when running the `ce-dev provision` step.

If this is the case then make sure that the cgroup option is set in your ce-dev.compose.prebuilt.yml file for the services that aren't starting.

```yaml
services:
web:
cgroup: host
image: 'codeenigma/drupal9-web:latest'
expose:
```

## VM Networking issue
If you're running ce-dev from within a Virtual Machine (eg. KVM/qemu), Docker container network ports are only 'exposed' to the hypervisor (ie the VM), and are not published for external access.
In order to access sites/files deployed by ce-dev, the ports needs to be published so that the Docker containers can be accessed from your workstation.
After running ```ce-dev init``` (before ```ce-dev start```) edit the ~/project/ce-dev/docker-compose.yml

Replace;
```

```yaml
expose:
- 443
- 80
- '22'
```

With;
```

```yaml
ports:
- '443:443'
- '80:80'
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,11 @@ cross-spawn@^7.0.2:
which "^2.0.1"

debug@^4.0.0, debug@^4.0.1, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
dependencies:
ms "^2.1.1"
ms "2.1.2"

deep-is@^0.1.3:
version "0.1.3"
Expand Down Expand Up @@ -1614,7 +1614,7 @@ moment@^2.22.1:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==

ms@^2.1.1:
[email protected].2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
Expand Down Expand Up @@ -2369,9 +2369,9 @@ widest-line@^3.1.0:
string-width "^4.0.0"

word-wrap@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
version "1.2.4"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f"
integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==

wrap-ansi@^4.0.0:
version "4.0.0"
Expand Down