-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Setup ol-web1 yet again #3938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cdrini
merged 20 commits into
internetarchive:master
from
cclauss:Setup-ol-web1-yet-again
Oct 30, 2020
Merged
Setup ol-web1 yet again #3938
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
56dc1f5
Setup ol-web1 yet again
cclauss 2ed58cf
fixup! Setup ol-web1 yet again
cclauss 89ebe4f
fixup! Define OL_REPO and OL_BRANCH
cclauss 3afb50b
/opt/olsystem /olsystem
cclauss abbd91c
fixup! resync
cclauss ecb28a7
Setup ol-web1 yet again
cclauss 9765a35
fixup! Simplify
cclauss c62d5cf
fixup! docker-compose.production.yml
cclauss 29cc9f9
Move nginx logic into docker-compose.production.yml
cclauss a52e771
Move nginx logic into docker-compose.production.yml
cclauss 15496b8
fixup! nginx logic
cclauss 6ca2d80
fixup! nginx logic
cclauss 525df40
fixup! nginx logic
cclauss 983b530
fixup! nginx logic
cclauss 9b65b02
fixup! nginx logic
cclauss befc72d
fixup! Run nginx outside of Docker
cclauss 1c0ed25
fixup! Run nginx outside of Docker
cclauss b791578
fixup! Remove all mention of nginx
cclauss 512ce5b
fixup! Remove nginx setup comments
cclauss a5bc546
No longer need to install nginx in web1
cdrini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/bin/bash | ||
| # This script is used to provision an ol-webX node _before_ docker gets on it. | ||
|
|
||
| # CAUTION: To git clone olsystem, environment variables must be set... | ||
| # Set $GITHUB_USERNAME or $USER will be used. | ||
| # Set $GITHUB_TOKEN or this script will halt. | ||
| if [[ -z ${GITHUB_TOKEN} ]]; then | ||
| echo "FATAL: Can not git clone olsystem" ; | ||
| exit 1 ; | ||
| fi | ||
|
|
||
| # apt list --installed | ||
| sudo apt-get update | ||
| sudo apt-get install -y docker.io docker-compose | ||
| docker --version # 19.03.8 | ||
| docker-compose version # 1.25.0 | ||
| sudo systemctl start docker | ||
| sudo systemctl enable docker | ||
|
|
||
| sudo groupadd --system openlibrary | ||
| 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 | ||
|
|
||
| OL_DOMAIN=${OL_DOMAIN:-internetarchive} | ||
| sudo git clone https://github.com/$OL_DOMAIN/openlibrary | ||
| ls -Fla # containerd, olsystem, openlibrary owned by openlibrary | ||
|
|
||
| cd /opt/openlibrary | ||
| OL_BRANCH=${OL_BRANCH:-master} | ||
| sudo git checkout $OL_BRANCH | ||
| sudo make git | ||
| cd /opt/openlibrary/vendor/infogami && sudo git pull origin master | ||
|
|
||
| cd /opt/openlibrary | ||
| sudo docker-compose down | ||
| sleep 2 | ||
| export DOCKER_CLIENT_TIMEOUT=500 | ||
| export COMPOSE_HTTP_TIMEOUT=500 | ||
| # NOTE: `cd /opt/openlibrary` and the remaining lines must be repeated manually | ||
| sudo docker-compose -f docker-compose.yml -f docker-compose.infogami-local.yml -f docker-compose.production.yml up --no-deps -d web | ||
| sudo docker-compose logs --tail=100 -f web | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.