From 47ec42b3b0ad910ee5e6e257aaf252e418947cc6 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 14 Oct 2021 14:49:05 +0200 Subject: [PATCH] Build tools: describe the exact commands to upload Expand the docstring to mention what are the exact commands required to compile and upload a new build tool version. --- scripts/compile_version_upload_s3.sh | 29 +++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/scripts/compile_version_upload_s3.sh b/scripts/compile_version_upload_s3.sh index 6ee146e03de..da6bd975379 100755 --- a/scripts/compile_version_upload_s3.sh +++ b/scripts/compile_version_upload_s3.sh @@ -24,22 +24,33 @@ # # To create a pre-compiled cached version and make it available on production, # **the script must be ran from a builder (build-default or build-large)** and -# it's required to set the following environment variables for an IAM user with -# permissions on ``readthedocs(inc)-build-tools-prod`` S3's bucket: +# it's required to set several environment variables for an IAM user with +# permissions on ``readthedocs(inc)-build-tools-prod`` S3's bucket. Also, note +# that in production we need to install `aws` Python package to run the script. +# We can do this in a different virtualenv to avoid collision with the builder's +# code. # -# AWS_REGION -# AWS_ACCESS_KEY_ID -# AWS_SECRET_ACCESS_KEY -# AWS_BUILD_TOOLS_BUCKET +# The whole process would be something like: # -# Note that in production we need to install `aws` Python package to run the -# script. We can do this in a different virtualenv to avoid collision with the -# builder's code: +# ssh util01 +# ssh `scaling status -s build-default -q | head -n 1` # +# sudo su - docs +# TOOL=python +# VERSION=3.10.0 +# +# cd /home/docs/checkouts/readthedocs.org/scripts # virtualenv venv # source venv/bin/activate # pip install awscli==1.20.34 # +# export AWS_REGION=... +# export AWS_ACCESS_KEY_ID=... +# export AWS_SECRET_ACCESS_KEY=... +# export AWS_BUILD_TOOLS_BUCKET=readthedocs(inc)-build-tools-prod +# +# ./compile_version_upload.sh $TOOL $VERSION +# # # USAGE #