-
Notifications
You must be signed in to change notification settings - Fork 191
Deploying to S3
The most important thing to remember about deploying the docs is that the deployment process is completely separate from the version control. The docs are hosted on Amazon S3 and have no awareness of Git or GitHub. When you make changes to the docs and push those changes to GitHub, this will have no impact on the actual generated docs. To change what users actually see on docs.basho.com you'll have to use a set of tools created by Basho.
The deployment process isn't terribly tricky in and of itself once you
get the hang of it. There's a deploy.rb
script in the root of the basho_docs
directory that handles the deployment process. If you run the script
with no arguments it will deploy the latest version of the docs for both
Riak and Riak CS:
./deploy.rb
What this does is transfer the generated files from your local machine to AWS.
Before you can deploy the docs from your machine, however, you'll need to get the proper AWS credentials from a Basho employee who has them. The script will attempt to fetch those credentials from your environment variables. You will need to set the following variables:
Variable | Value |
---|---|
AWS_ACCESS_KEY_ID |
secret |
AWS_SECRET_ACCESS_KEY |
secret |
AWS_CLOUNDFRONT_DIST_ID |
secret |
AWS_S3_BUCKET |
riakdocs.en |
You can set those temporarily using export
:
export VARIABLE=VALUE
But it's best to store them in your .bash_profile
, .bashrc
,
.zshrc
, or related file so that they are loaded into your environment
every time you start your shell.
As stated above, if you run the deploy script with no arguments it will deploy the latest version of the Riak and Riak CS docs. You can deploy different versions, however, as follows:
./deploy.rb RIAK_VERSION RIAK_CS_VERSION
The following would thus deploy Riak 1.4.12 and Riak CS 1.5.1:
./deploy.rb 1.4.12 1.5.1
It's important to bear in mind that the deploy process does not upload static assets such as images. If you need to add static assets like images or anything else that isn't HTML, CSS, or JavaScript, you'll need to do so manually using a tool like s3cmd.