Skip to content

Commit 6fa8d8d

Browse files
committed
cloudflare: Update ssh commands to use hostnames
1 parent 8c73755 commit 6fa8d8d

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎deploy-docs.sh‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ set -xeu
66
REF="$GITHUB_REF_NAME"
77
# The first path component, e.g. "infrastructure" or "profiles".
88
COMPONENT="${PATH_PREFIX%%/*}"
9+
# The hostname, in case of proxy.
10+
HOST=ocp19.open-contracting.org
911

1012
# If a git tag or live branch is pushed.
1113
if [ "$PRODUCTION" = "true" ]; then
@@ -16,12 +18,10 @@ else
1618
SUFFIX=""
1719
fi
1820

19-
curl --silent --connect-timeout 1 standard.open-contracting.org:8255 || true
20-
2121
# If a git tag isn't pushed, deploy the build directory from the git branch.
2222
if [ "$RELEASE" != "true" ]; then
23-
curl --silent --connect-timeout 1 standard.open-contracting.org:8255 || true
24-
rsync -az --delete-after build/ ocds-docs@standard.open-contracting.org:web/"$PREFIX""$PATH_PREFIX""$REF""$SUFFIX"
23+
curl --silent --connect-timeout 1 $HOST:8255 || true
24+
rsync -az --delete-after build/ ocds-docs@$HOST:web/"$PREFIX""$PATH_PREFIX""$REF""$SUFFIX"
2525

2626
# Index the build directory.
2727
ocdsindex sphinx build/ https://standard.open-contracting.org/"$PREFIX""$PATH_PREFIX""$REF"/ > documents.json
@@ -33,9 +33,9 @@ if [ "$RELEASE" != "true" ]; then
3333

3434
if [ "$PRODUCTION" = "true" ]; then
3535
# Symlink the live directory.
36-
curl --silent --connect-timeout 1 standard.open-contracting.org:8255 || true
36+
curl --silent --connect-timeout 1 $HOST:8255 || true
3737
# shellcheck disable=SC2087
38-
ssh ocds-docs@standard.open-contracting.org /bin/bash <<- EOF
38+
ssh ocds-docs@$HOST /bin/bash <<- EOF
3939
mkdir -p /home/ocds-docs/web/$PREFIX$PATH_PREFIX
4040
ln -nfs $REF$SUFFIX /home/ocds-docs/web/$PREFIX$PATH_PREFIX$REF
4141
EOF
@@ -49,9 +49,9 @@ else
4949
fi
5050

5151
# Deploy the schema files, codelist files and metadata file (if any).
52-
curl --silent --connect-timeout 1 standard.open-contracting.org:8255 || true
52+
curl --silent --connect-timeout 1 $HOST:8255 || true
5353
# shellcheck disable=SC2087
54-
ssh ocds-docs@standard.open-contracting.org /bin/bash <<- EOF
54+
ssh ocds-docs@$HOST /bin/bash <<- EOF
5555
mkdir -p /home/ocds-docs/web/"$PATH_PREFIX""$DIRECTORY"/"$REF"/
5656
cp -r /home/ocds-docs/web/"$PATH_PREFIX""$VERSION"/en/*.json /home/ocds-docs/web/"$PATH_PREFIX""$DIRECTORY"/"$REF"/
5757
cp -r /home/ocds-docs/web/"$PATH_PREFIX""$VERSION"/en/codelists /home/ocds-docs/web/"$PATH_PREFIX""$DIRECTORY"/"$REF"/

‎docs/use/kingfisher.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Connect to the data support server, replacing ``USER``:
3232

3333
.. code-block:: bash
3434
35-
ssh USER@collect.kingfisher.open-contracting.org
35+
ssh USER@ocp23.open-contracting.org
3636
3737
In addition to the Kingfisher tools, users have access to these command-line tools:
3838

‎docs/use/ssh.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ On machines running Docker, use SSH as usual. For example:
99

1010
.. code-block:: bash
1111
12-
ssh USER@collect.kingfisher.open-contracting.org
12+
ssh USER@ocp42.open-contracting.org
1313
1414
On machines not running Docker, the SSH port is closed by default. The easiest way to open it depends on whether your IP address is dynamic or static.
1515

@@ -20,7 +20,7 @@ To open the SSH port for 30 seconds, send traffic to port 8255, replacing ``exam
2020

2121
.. code-block:: bash
2222
23-
curl --silent --connect-timeout 1 example.open-contracting.org:8255 || true
23+
curl --silent --connect-timeout 1 ocp42.open-contracting.org:8255 || true
2424
2525
You can then use ``ssh`` as usual. Once you're connected, the server will close the port, but not your connection.
2626

0 commit comments

Comments
 (0)