Skip to content

Commit

Permalink
Merge pull request #9107 from cdrini/9001/feature/new-web-head
Browse files Browse the repository at this point in the history
Add new ol-web0 web head
  • Loading branch information
cdrini authored Apr 17, 2024
2 parents e8ea2ba + 300fbd7 commit 1447d83
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion compose.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
version: "3.8"
services:
web:
profiles: ["ol-web1", "ol-web2"]
profiles: ["ol-web0", "ol-web1", "ol-web2"]
image: "${OLIMAGE:-openlibrary/olbase:latest}"
restart: unless-stopped
hostname: "$HOSTNAME"
Expand Down
4 changes: 2 additions & 2 deletions scripts/deployment/are_servers_in_sync.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SERVERS="ol-home0 ol-covers0 ol-web1 ol-web2 ol-www0 ol-solr0"
POLICY_SERVERS="ol-home0 ol-web1 ol-web2"
SERVERS="ol-home0 ol-covers0 ol-web0 ol-web1 ol-web2 ol-www0 ol-solr0"
POLICY_SERVERS="ol-home0 ol-web0 ol-web1 ol-web2"
REPO_DIRS="/opt/olsystem /opt/openlibrary /opt/openlibrary/vendor/infogami"

for REPO_DIR in $REPO_DIRS; do
Expand Down
2 changes: 1 addition & 1 deletion scripts/deployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -o xtrace

# See https://github.com/internetarchive/openlibrary/wiki/Deployment-Scratchpad
SERVERS="ol-home0 ol-covers0 ol-web1 ol-web2 ol-www0 ol-solr0"
SERVERS="ol-home0 ol-covers0 ol-web0 ol-web1 ol-web2 ol-www0 ol-solr0"
COMPOSE_FILE="compose.yaml:compose.production.yaml"

# This script must be run on ol-home0 to start a new deployment.
Expand Down
2 changes: 1 addition & 1 deletion scripts/deployment/pre_deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

SERVERS="ol-home0 ol-covers0 ol-web1 ol-web2 ol-www0 ol-solr0"
SERVERS="ol-home0 ol-covers0 ol-web0 ol-web1 ol-web2 ol-www0 ol-solr0"
REPO_DIRS="/opt/olsystem /opt/openlibrary /opt/openlibrary/vendor/infogami /opt/booklending_utils"

for REPO_DIR in $REPO_DIRS; do
Expand Down
35 changes: 21 additions & 14 deletions scripts/setup_olserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,42 @@ fi

# apt list --installed
sudo apt-get update

# Remove any old versions and install newer versions of Docker Engine and Docker Compose.
# See https://docs.docker.com/engine/install/ubuntu/ for any possible changes.
sudo apt-get remove docker docker-engine docker.io containerd runc
DOCKER_VERSION=5:20.10.7~3-0~ubuntu-focal
sudo apt-get remove docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc

sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release

sudo mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# apparmor is REQUIRED on Internet Archive servers
sudo apt-get install -y \
# *REQUIRED* on Internet Archive servers
apparmor \
containerd.io \
docker-ce=$DOCKER_VERSION \
docker-ce-cli=$DOCKER_VERSION \
docker-ce \
docker-ce-cli \
docker-buildx-plugin \
docker-compose-plugin

docker --version # 20.10.7, build f0df350
docker compose version # v2.16.0
docker --version # 26.0.0, build 2ae903e
docker compose version # v2.25.0
sudo systemctl start docker
sudo systemctl enable docker

Expand All @@ -62,8 +69,8 @@ sudo useradd --no-log-init --system --gid openlibrary --create-home openlibrary
cd /opt
ls -Fla # nothing

sudo git clone https://${GITHUB_USERNAME:-$USER}:${GITHUB_TOKEN}@github.com/internetarchive/olsystem
sudo git clone https://github.com/internetarchive/openlibrary
sudo git clone git@github.com:internetarchive/olsystem.git
sudo git clone git@github.com:internetarchive/openlibrary.git
cd /opt/openlibrary
sudo make git
cd /opt/openlibrary/vendor/infogami
Expand Down

0 comments on commit 1447d83

Please sign in to comment.