diff --git a/.drone.yml b/.drone.yml index 8557338..d557f70 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,7 +5,7 @@ name: default steps: # use the step name to mock out the gethostname() call in our tests - name: phosphoric-acid - image: python:3.7-buster + image: python:3.9-bullseye # unfortunately we have to do everything in one step because there's no # way to share system packages between steps commands: @@ -25,12 +25,12 @@ steps: services: - name: auth1 - image: debian:buster + image: debian:bullseye commands: - .drone/auth1-setup.sh - sleep infinity - name: coffee - image: debian:buster + image: debian:bullseye commands: - .drone/coffee-setup.sh - sleep infinity diff --git a/.drone/auth1-setup.sh b/.drone/auth1-setup.sh index db648eb..a278e82 100755 --- a/.drone/auth1-setup.sh +++ b/.drone/auth1-setup.sh @@ -28,7 +28,6 @@ killall slapd || true service nslcd stop || true rm -rf /etc/ldap/slapd.d rm /var/lib/ldap/* -cp /usr/share/slapd/DB_CONFIG /var/lib/ldap/DB_CONFIG cp .drone/slapd.conf /etc/ldap/slapd.conf cp .drone/ldap.conf /etc/ldap/ldap.conf cp /usr/share/doc/sudo-ldap/schema.OpenLDAP /etc/ldap/schema/sudo.schema diff --git a/.drone/coffee-setup.sh b/.drone/coffee-setup.sh index f347099..a93d96a 100755 --- a/.drone/coffee-setup.sh +++ b/.drone/coffee-setup.sh @@ -11,9 +11,9 @@ add_fqdn_to_hosts $(get_ip_addr auth1) auth1 apt install --no-install-recommends -y default-mysql-server postgresql # MYSQL -service mysql stop -sed -E -i 's/^(bind-address[[:space:]]+= 127.0.0.1)$/#\1/' /etc/mysql/mariadb.conf.d/50-server.cnf -service mysql start +service mariadb stop +sed -E -i 's/^(bind-address[[:space:]]+= 127\.0\.0\.1)$/#\1/' /etc/mysql/mariadb.conf.d/50-server.cnf +service mariadb start cat < $POSTGRES_DIR/pg_hba.conf # TYPE DATABASE USER ADDRESS METHOD local all postgres peer diff --git a/.drone/common.sh b/.drone/common.sh index 185d701..e194230 100644 --- a/.drone/common.sh +++ b/.drone/common.sh @@ -75,6 +75,7 @@ auth_setup() { # LDAP apt install -y --no-install-recommends libnss-ldapd service nslcd stop || true + mkdir -p /etc/ldap cp .drone/ldap.conf /etc/ldap/ldap.conf grep -Eq '^map group member uniqueMember$' /etc/nslcd.conf || \ echo 'map group member uniqueMember' >> /etc/nslcd.conf diff --git a/README.md b/README.md index a5593c4..3b66fbd 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Docker containers instead, which are much easier to work with than the VM. First, make sure you create the virtualenv: ```sh -docker run --rm -v "$PWD:$PWD:z" -w "$PWD" python:3.7-buster sh -c 'apt update && apt install -y libaugeas0 && python -m venv venv && . venv/bin/activate && pip install -r requirements.txt -r dev-requirements.txt' +docker run --rm -v "$PWD:$PWD:z" -w "$PWD" python:3.9-bullseye sh -c 'apt update && apt install -y libaugeas0 && python -m venv venv && . venv/bin/activate && pip install -r requirements.txt -r dev-requirements.txt' ``` Then bring up the containers: ```sh diff --git a/docker-compose.yml b/docker-compose.yml index 408670d..59d246c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.6" x-common: &common - image: python:3.7-buster + image: python:3.9-bullseye volumes: - .:$PWD:z environment: @@ -14,7 +14,7 @@ x-common: &common services: auth1: <<: *common - image: debian:buster + image: debian:bullseye hostname: auth1 command: auth1