Skip to content

Commit

Permalink
Merge pull request #1579 from USEPA/version-20241111-live-merge-main
Browse files Browse the repository at this point in the history
Version 2024-11-11
  • Loading branch information
carsoncho authored Nov 13, 2024
2 parents 2f3c7dd + e2ec612 commit 338b9d8
Show file tree
Hide file tree
Showing 166 changed files with 49,920 additions and 6,440 deletions.
111 changes: 46 additions & 65 deletions .buildkite/README.md

Large diffs are not rendered by default.

82 changes: 0 additions & 82 deletions .buildkite/build-images.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .buildkite/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ steps:

# Use the more powerful Docker builder agent pool
agents:
queue: docker-builders
queue: docker-builders-arm

# This concurrency group is shared with the fpm-metrics container build
# below this step.
Expand Down
15 changes: 1 addition & 14 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ steps:
build.branch != "integration" &&
build.branch != "main" &&
build.branch != "release" &&
build.branch != "live" &&
build.branch != "EPAD8-1705-USWDS-3"
build.branch != "live"

command: buildkite-agent pipeline upload .buildkite/feature.yml
env:
Expand Down Expand Up @@ -59,15 +58,3 @@ steps:
env:
WEBCMS_ENVIRONMENT: preproduction
WEBCMS_SITE: ${BUILDKITE_BRANCH}

# The USWDS environment gets deployed from a branch where WEBCMS_SITE doesn't
# match up, so we handle it specially here.
- label: ":pipeline: WebCMS (uswds)"
if:
build.pull_request.id == null &&
build.branch == "EPAD8-1705-USWDS-3"

command: buildkite-agent pipeline upload .buildkite/webcms.yml
env:
WEBCMS_ENVIRONMENT: preproduction
WEBCMS_SITE: uswds
1 change: 1 addition & 0 deletions .buildkite/terraform.apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ steps:
- TF_VAR_site=${WEBCMS_SITE}
- TF_VAR_lang=${WEBCMS_LANG}
- TF_VAR_image_tag=${WEBCMS_IMAGE_TAG}
- TF_VAR_cpu_architecture=ARM64
1 change: 1 addition & 0 deletions .buildkite/terraform.plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,4 @@ steps:
- TF_VAR_site=${WEBCMS_SITE}
- TF_VAR_lang=${WEBCMS_LANG}
- TF_VAR_image_tag=${WEBCMS_IMAGE_TAG}
- TF_VAR_cpu_architecture=ARM64
12 changes: 11 additions & 1 deletion .buildkite/webcms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ steps:
- drush

agents:
queue: docker-builders
queue: docker-builders-arm

concurrency_group: $BUILDKITE_PIPELINE_SLUG/build-$BUILDKITE_BRANCH
concurrency: 4
Expand Down Expand Up @@ -77,6 +77,9 @@ steps:
- wait: ~

# It's safe to deploy English and Spanish ECS Terraform in parallel since they
# are independent at the AWS API level

- label: ":terraform: WebCMS (${WEBCMS_SITE}-en)"
command: buildkite-agent pipeline upload .buildkite/terraform.apply.yml

Expand All @@ -97,6 +100,8 @@ steps:

- wait: ~

# Similarly, it's safe to run Drush on English and Spanish in parallel

- label: ":ecs: Drush (${WEBCMS_SITE}-en)"
concurrency_group: $BUILDKITE_PIPELINE_SLUG/drush-$WEBCMS_SITE-en
concurrency: 1
Expand All @@ -105,6 +110,11 @@ steps:
- docker#v3.8.0:
image: node:14-alpine
entrypoint: /bin/sh

# We create ~/.aws/credentials and use AWS_PROFILE here instead of
# generating session tokens because Drush can sometimes run for a very
# long time, causing one-time tokens to expire. By using a profile,
# the AWS SDK can refresh its session tokens.
command:
- -ec
- |
Expand Down
2 changes: 1 addition & 1 deletion services/drupal/.ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: epa
type: drupal9
docroot: web
php_version: "8.1"
php_version: "8.2"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.aws.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.6"
services:
# AWS cli image set to talk to Minio. `f1 run aws s3 [ARG...]' is the replacement for
# `aws s3 [ARG...]' with overrides set.
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.elasticsearch.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.6'
services:
elasticsearch:
container_name: ddev-${DDEV_SITENAME}-elasticsearch
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.gesso.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.6'
services:
gesso:
container_name: ddev-${DDEV_SITENAME}-gesso
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.localstack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.6"
services:
localstack:
container_name: ddev-${DDEV_SITENAME}-localstack
Expand Down
4 changes: 1 addition & 3 deletions services/drupal/.ddev/docker-compose.memcached.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.6'

services:
memcached:
container_name: ddev-${DDEV_SITENAME}-memcached
Expand All @@ -17,4 +15,4 @@ services:
- ".:/mnt/ddev_config"
web:
links:
- memcached:memcached
- memcached:memcached
10 changes: 6 additions & 4 deletions services/drupal/.ddev/docker-compose.minio.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.6"

services:
minio:
container_name: ddev-${DDEV_SITENAME}-minio
Expand All @@ -10,13 +8,17 @@ services:
- minio
- server
- /data
- --console-address
- :9090
environment:
MINIO_ACCESS_KEY: minio_access
MINIO_SECRET_KEY: minio_secret
MINIO_UID: $DDEV_UID
MINIO_GUID: $DDEV_UID
MINIO_DOMAIN: minio
VIRTUAL_HOST: $DDEV_HOSTNAME
HTTP_EXPOSE: 9001:9000
HTTPS_EXPOSE: 9002:9000
HTTP_EXPOSE: "9001:9000,9089:9090"
HTTPS_EXPOSE: "9002:9000,9090:9090"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
Expand Down
2 changes: 0 additions & 2 deletions services/drupal/.ddev/docker-compose.mysql.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.6"

services:
mysql:
container_name: ddev-${DDEV_SITENAME}-mysql
Expand Down
2 changes: 0 additions & 2 deletions services/drupal/.ddev/docker-compose.simplesaml.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.6"

services:
simplesaml:
container_name: ddev-${DDEV_SITENAME}-simplesaml
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.volumes.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.6"
services:
web:
volumes:
Expand Down
1 change: 1 addition & 0 deletions services/drupal/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
WEBCMS_HASH_SALT=abcdefg

WEBCMS_S3_BUCKET=drupal
WEBCMS_S3_SNAPSHOT_BUCKET=f1-webcms-snapshot-testing
WEBCMS_S3_REGION=us-east-1

WEBCMS_CF_DISTRIBUTIONID=abcdef
Expand Down
52 changes: 8 additions & 44 deletions services/drupal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,4 @@
FROM public.ecr.aws/docker/library/php:8.1-fpm-alpine AS memcached-ext

# Set working directory to /tmp
WORKDIR /tmp

# First, install compile-time dependencies
RUN apk add --no-cache $PHPIZE_DEPS libmemcached-dev zlib-dev

# Next, install the prequisite igbinary extension
RUN pecl install igbinary

# Finally, build and install memcached. We have to do this instead of the
# traditional pecl install method because we pass custom flags to memcached's
# ./configure script, which does not appear to be supported by the pecl command.
RUN set -ex \
&& PECL_MEMCACHED_VERSION=3.2.0 \
&& cd /tmp \
&& pecl download memcached-$PECL_MEMCACHED_VERSION \
&& tar xzf memcached-$PECL_MEMCACHED_VERSION.tgz \
&& cd memcached-$PECL_MEMCACHED_VERSION \
&& phpize \
&& ./configure --enable-memcached-igbinary \
&& make \
&& make install

FROM public.ecr.aws/docker/library/php:8.1-fpm-alpine AS base
FROM public.ecr.aws/docker/library/php:8.2-fpm-alpine AS base

# Bump system packages
RUN apk upgrade
Expand All @@ -48,15 +23,9 @@ RUN set -ex \

WORKDIR /var/www/html

# Copy and enable the memcached extension (and its dependency, igbinary)
COPY --from=memcached-ext \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/igbinary.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/memcached.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/
RUN docker-php-ext-enable igbinary && docker-php-ext-enable memcached

# APK packages needed by this image
RUN install-php-extensions apcu sockets \
# PHP packages needed by this image
RUN install-php-extensions apcu sockets igbinary memcached \
# APK packages needed by this image
&& apk add --no-cache \
# Needed by the memcached extension
libmemcached \
Expand Down Expand Up @@ -152,7 +121,7 @@ RUN composer install \
RUN rm auth.json

# Build Gesso, the WebCMS' theme
FROM forumone/gesso:3-node-v18-php-8.1 AS gesso
FROM forumone/gesso:node-v18-php-8.1 AS gesso

WORKDIR /app

Expand Down Expand Up @@ -239,7 +208,7 @@ CMD [ "nginx", "-g", "daemon off;" ]

# Build a drush-specific image: this image includes command-line utilities such as mysql
# and ssh that are inappropriate for a server container image.
FROM public.ecr.aws/docker/library/php:8.1-cli-alpine AS drush
FROM public.ecr.aws/docker/library/php:8.2-cli-alpine AS drush

# Bump system packages
RUN apk upgrade
Expand All @@ -253,6 +222,8 @@ RUN set -ex \
opcache \
pdo_mysql \
zip \
igbinary \
memcached \
&& apk add --no-cache \
mysql-client \
openssh \
Expand All @@ -265,13 +236,6 @@ RUN set -ex \
ENV PATH=${PATH}:/var/www/html/vendor/bin
WORKDIR /var/www/html

# Copy and enable the memcached extension (and its dependency, igbinary)
COPY --from=memcached-ext \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/igbinary.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/memcached.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/
RUN docker-php-ext-enable igbinary && docker-php-ext-enable memcached

# APK packages needed by this image
RUN install-php-extensions apcu sockets \
&& apk add --no-cache \
Expand Down
Loading

0 comments on commit 338b9d8

Please sign in to comment.