Skip to content

Commit

Permalink
Require Perl v5.30, Node v16
Browse files Browse the repository at this point in the history
https://blog.metabrainz.org/2021/03/17/schema-change-release-may-17-2021/

Note: This switches the underlying Ubuntu base image to focal.
  • Loading branch information
mwiencek committed May 7, 2021
1 parent bfe5e22 commit b9ff252
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
executors:
musicbrainz-tests:
docker:
- image: metabrainz/musicbrainz-tests:v-2020-11
- image: metabrainz/musicbrainz-tests:v-2021-05
user: root
working_directory: /home/musicbrainz/musicbrainz-server

Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Prerequisites
**This document will assume you are using Ubuntu (at least 14.04) for its
instructions.**

2. Perl (at least version 5.18.2)
2. Perl (at least version 5.30)

Perl comes bundled with most Linux operating systems, you can check your
installed version of Perl with:
Expand Down Expand Up @@ -68,7 +68,7 @@ Prerequisites
in lib/DBDefs.pm. The defaults should be fine if you don't use
your redis install for anything else.

6. Node.js (at least version 10.15) and Yarn
6. Node.js (at least version 16) and Yarn

Node.js is required to build (and optionally minify) our JavaScript and CSS.
If you plan on accessing musicbrainz-server inside a web browser, you should
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Full installation instructions are available in [INSTALL.md](INSTALL.md).
General Prerequisites:

* Ubuntu/Debian
* Node (at least version 10.15)
* Perl (at least version 5.18.2)
* Node (at least version 16)
* Perl (at least version 5.30)
* PostgreSQL (at least version 12)

Reporting bugs
Expand Down
2 changes: 1 addition & 1 deletion cpanfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
requires 'perl' => '5.18.2';
requires 'perl' => '5.30.0';

# Mandatory modules
requires 'Algorithm::Diff' => '1.1902';
Expand Down
27 changes: 15 additions & 12 deletions docker/Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM phusion/baseimage:0.11
FROM phusion/baseimage:focal-1.0.0-alpha1-amd64

RUN useradd --create-home --shell /bin/bash musicbrainz

Expand All @@ -21,14 +21,14 @@ RUN apt-get update && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
curl -sLO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
curl -sLO https://deb.nodesource.com/node_10.x/pool/main/n/nodejs/nodejs_10.17.0-1nodesource1_amd64.deb && \
curl -sLO https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.1.0-deb-1nodesource1_amd64.deb && \
apt-get update && \
apt-get install \
--no-install-recommends \
--no-install-suggests \
-y \
./google-chrome-stable_current_amd64.deb \
./nodejs_10.17.0-1nodesource1_amd64.deb \
./nodejs_16.1.0-deb-1nodesource1_amd64.deb \
build-essential \
bzip2 \
gcc \
Expand All @@ -50,12 +50,12 @@ RUN apt-get update && \
libexpat1 \
libexpat1-dev \
libicu-dev \
libicu60 \
libicu66 \
libperl-dev \
libpq-dev \
libpq5 \
libssl-dev \
libssl1.0.0 \
libssl1.1 \
libxml2 \
libxml2-dev \
locales \
Expand All @@ -70,19 +70,21 @@ RUN apt-get update && \
postgresql-12 \
postgresql-12-pgtap \
postgresql-server-dev-12 \
python2.7-dev \
python2.7-minimal \
python2 \
python2-dev \
rabbitmq-server \
redis-server \
runit \
runit-systemd \
sudo \
unzip \
virtualenv \
yarn && \
wget \
yarn \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* && \
rm google-chrome-stable_current_amd64.deb && \
rm nodejs_10.17.0-1nodesource1_amd64.deb && \
rm nodejs_16.1.0-deb-1nodesource1_amd64.deb && \
update-java-alternatives -s java-1.8.0-openjdk-amd64 && \
systemctl disable rabbitmq-server

Expand All @@ -98,10 +100,11 @@ RUN sudo -E -H -u musicbrainz carton install --deployment && \
rm cpanfile cpanfile.snapshot

RUN mkdir musicbrainz-server
ENV PG_AMQP_TAG v0.4.1
ENV PG_AMQP_COMMIT 240d477

RUN git clone --branch $PG_AMQP_TAG --depth 1 https://github.com/omniti-labs/pg_amqp.git && \
RUN git clone --depth 1 https://github.com/omniti-labs/pg_amqp.git && \
cd pg_amqp && \
git reset --hard $PG_AMQP_COMMIT && \
make && \
make install && \
cd /home/musicbrainz
Expand Down Expand Up @@ -139,7 +142,7 @@ RUN sudo -E -H -u musicbrainz git clone https://github.com/metabrainz/sir.git &&
sudo -E -H -u musicbrainz sh -c 'virtualenv --python=python2 venv; . venv/bin/activate; pip install -r requirements.txt; pip install git+git://github.com/esnme/ultrajson.git@7d0f4fb7e911120fd09075049233b587936b0a65' && \
cd /home/musicbrainz

RUN curl -sLO https://chromedriver.storage.googleapis.com/81.0.4044.138/chromedriver_linux64.zip && \
RUN curl -sLO https://chromedriver.storage.googleapis.com/90.0.4430.24/chromedriver_linux64.zip && \
unzip chromedriver_linux64.zip -d /usr/local/bin && \
chmod +x /usr/local/bin/chromedriver && \
rm chromedriver_linux64.zip
Expand Down
2 changes: 1 addition & 1 deletion docker/templates/Dockerfile.cpanfile-snapshot.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
m4_include(`macros.m4')m4_dnl
FROM metabrainz/consul-template-base:v0.18.5-2
FROM metabrainz/consul-template-base:focal-1.0.0-alpha1_ct_0.25.2

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
12 changes: 7 additions & 5 deletions docker/templates/macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ m4_define(`apt_purge', `apt-get purge --auto-remove -y $1')

m4_define(`sudo_mb', `sudo -E -H -u musicbrainz $1')

m4_define(`NODEJS_DEB', `nodejs_10.17.0-1nodesource1_amd64.deb')
m4_define(`NODEJS_DEB', `nodejs_16.1.0-deb-1nodesource1_amd64.deb')

m4_define(
`install_javascript',
Expand All @@ -23,9 +23,9 @@ copy_mb(``package.json yarn.lock ./'')
RUN apt-key add /tmp/yarn_pubkey.txt && \
rm /tmp/yarn_pubkey.txt && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt_install(``git python-minimal yarn'') && \
apt_install(``git python3-minimal yarn'') && \
cd /tmp && \
curl -sLO https://deb.nodesource.com/node_10.x/pool/main/n/nodejs/NODEJS_DEB && \
curl -sLO https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/NODEJS_DEB && \
dpkg -i NODEJS_DEB && \
cd - && \
sudo_mb(``yarn install$1'')
Expand Down Expand Up @@ -56,6 +56,7 @@ libperl-dev m4_dnl
libpq-dev m4_dnl
libssl-dev m4_dnl
libxml2-dev m4_dnl
zlib1g-dev m4_dnl
pkg-config')

# postgresql-server-dev-12 provides pg_config, which is needed by InitDb.pl
Expand All @@ -69,11 +70,12 @@ libdb5.3 m4_dnl
libexpat1 m4_dnl
libicu55 m4_dnl
libpq5 m4_dnl
libssl1.0.0 m4_dnl
libssl1.1 m4_dnl
libxml2 m4_dnl
perl m4_dnl
postgresql-client-12 m4_dnl
postgresql-server-dev-12')
postgresql-server-dev-12 m4_dnl
zlib1g')

m4_define(
`test_db_run_deps',
Expand Down
2 changes: 1 addition & 1 deletion docker/templates/server_base.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
m4_include(`macros.m4')m4_dnl
FROM metabrainz/consul-template-base:v0.18.5-2
FROM metabrainz/consul-template-base:focal-1.0.0-alpha1_ct_0.25.2

ARG DEBIAN_FRONTEND=noninteractive

Expand Down

0 comments on commit b9ff252

Please sign in to comment.