-
Notifications
You must be signed in to change notification settings - Fork 5
Setup
Install Ruby 2.3+
Install ChefDK
gem install opzworks
The gem reads information from ~/.aws/config
, or from the file referenced by
the AWS_CONFIG_FILE
environment variable. It should already look something like this,
and you can just symlink ~/.aws/credentials to it:
[default]
aws_access_key_id = ilmiochiaveID
aws_secret_access_key = ilmiochiavesegreto
region = us-east-1
output = json
If you're using ~/.aws/credentials
in addition to ~/.aws/config
, you need to
have an explicit [default]
block specified there as well.
None of the above is Opzworks specific. Please reference the AWS config file guide.
If you want the gem to read from an environment other than 'default', you can do so
by exporting the AWS_PROFILE
environment variable. It should be set to whatever profile
name you have defined that you want to use in the config file.
Opzworks reads from ~/.opzworks/config
, or from the file specified in the OPZWORKS_CONFIG_FILE environment variable.
Add the following block to the config file:
[default]
ssh-user-name = <MY SSH USER NAME>
berks-repository-path = <PATH TO OPSWORKS BERKSHELF REPOSITORIES>
berks-github-org = <GITHUB ORG THAT YOUR OPSWORKS REPOSITORIES EXIST UNDER>
berks-s3-bucket = <AN EXISTING S3 BUCKET>
You can specify multiple blocks, and select which is used via the OPZWORKS_PROFILE environment variable.
The ssh-user-name
value should be set to the username you want to use when
logging in remotely, most probably the user name from your My Settings page
in OpsWorks.
The berks-repository-path
should point to a base directory in which your opsworks
git repositories for each stack will live.
The berks-s3-bucket
will default to 'opzworks' if not set. You need to create the
the bucket manually (e.g. aws s3 mb s3://opsworks-cookbook-bucket
).
The berks-github-org
setting is used if you try to run berks
or json
on a stack, and
the local opsworks-${project} repo isn't found. In this event, the code will attempt to clone
the repo into berks-repository-path
and continue.
Additional options are:
berks-base-path
, which is the temporary base directory where the berkshelf will be
built. Defaults to /tmp.
berks-tarball-name
, which is the name of the tarball that will be uploaded to S3. Defaults to cookbooks.tgz.