Skip to content

To build isle dc on Linode from scratch (quickly)

Don Richards edited this page May 12, 2022 · 9 revisions

Tested this on a Linode Ubuntu 20.10 server. Once you have a URL pointing to the server (by adding the A & AAAA records)

Create a new server and ssh into it.

These are the commands to run manually on the Linode server or run the below script to skip most of this.

# Install Docker and docker related tools.
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release

# https://github.com/Islandora-Collaboration-Group/ISLE/blob/main/docs/install/host-software-dependencies.md#step-2-install-docker
sudo apt update && sudo apt upgrade
sudo apt install -y openssl git htop ntp wget nano software-properties-common

curl -fsSL [url]/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu/ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt -y install docker-ce docker-ce-cli containerd.io

sudo groupadd docker
sudo usermod -aG docker $USER

sudo systemctl start docker
sudo systemctl enable docker
sudo systemctl enable containerd
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

# Backup bashrc just in case there's an issue and then update it.
cp ~/.bashrc ~/.bashrc_bak
echo "alias docker-compose='/usr/local/bin/docker-compose'" >> ~/.bashrc
source ~/.bashrc

# Install apps needed for the makefile to run.
sudo apt install -y make git

# You can change this to whatever you need.
echo "Pick a directory, doesn't completely matter where"
mkdir -p /var/www/
cd /var/www/

git clone https://github.com/Islandora-Devops/isle-dc
cd isle-dc

# Needed for hosting on a server with a domain.
echo Domain you wish to use?
echo ====================================
echo
read -p 'Domain: ' userdomain
echo
echo Email you wish to use?
echo ====================================
echo
read -p 'Email: ' useremail
echo

# If you aren't using a domain name you can remove this chunk of code.
cp sample.env .env
sed --in-place='' "s/DOMAIN=.*$/DOMAIN=${userdomain}/g" .env

echo "To get Letsencrypt to sign SSL certs"
sed --in-place='' 's/USE_ACME=false/USE_ACME=true/g' .env
sed --in-place='' "s/ACME_EMAIL=.*$/ACME_EMAIL=${useremail}/g" .env
echo "ACME_SERVER=https://acme-v02.api.letsencrypt.org/directory" >> .env
echo "TRAEFIK_LOG_LEVEL=ERROR" >> .env
# End of domain specific commands.

echo "This is a tmp fix for a known error."
sed --in-place='' 's/TAG=.*$/TAG=1.0.0-alpha-15/g' .env
sed --in-place='' 's/DRUPAL_INSTALL_PROFILE=.*$/DRUPAL_INSTALL_PROFILE=standard/g' .env

make -B docker-compose.yml
make up

OR just run this directly from the gist

bash <(curl -sL https://gist.githubusercontent.com/DonRichards/e65b4e4d76101c30a7a8ab77160ac33f/raw/basic_isle_dc_install_script.sh)

More information on this script view the Gist


Navigate to your URL/Domain to check that this build script worked as expected.

These instructions are missing stuff like security. This is just a set of minimal instructions needed to get "isle-dc" running within a Linode server. This probably could apply to any fresh Ubuntu server built on Godaddy, Rackspace, AWS, Amazon's Lightsail, etc.