Skip to content

Commit

Permalink
Merge e5ee42f into ba0262d
Browse files Browse the repository at this point in the history
  • Loading branch information
csquared committed Sep 17, 2015
2 parents ba0262d + e5ee42f commit e5e7b83
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,56 @@

## Development

### Prerequisites

The Convox API coordinates AWS so we develop against AWS. Passing the `--development` flag
to the `convox install` command tells the installer to create the resources the API
needs but doesn't run the API itself.

After a successful install, `convox install` prints out a set of ENV vars the API needs to
talk to the AWS resources it just provisioned.

Copy and paste these values to a `.env` file so that `convox start` can read them.

$ convox install --stack-name=convox-dev --development ~/credentials.csv

# add env vars to .env

### Running

Now that you have your AWS resources in place and your ENV configured in `.env`, all you need to do is:

$ convox start

to boot a local API instance. You can then login to the API via the command line:

$ convox login <host> --password $PASSWORD

Where `<host>` is going to be the hostname or ip address of your local docker install. If you're on linux
then its simply `localhost`. If you're on OS X, then it is one of:

- `docker-machine ip <machine>`
- `boot2docker ip`

And the `PASSWORD` is in the ENV data in your `.env` file.

### Building locally

For pushes to the convox registry to work locally, you need to configure the docker daemon to talk to the
registry that is running in Amazon.

You can get the convox registry from `REGISTRY_HOST` or the error output from docker when you try
to login. Pass this value to the `--engine-insecure-registry` flag of `docker-machine`
when you create a VM. This means you'll need to create a new machine via:

docker-machine create --driver virtualbox --engine-insecure-registry $(cat .env | grep REGISTRY_HOST | tr -d 'REGISTRY_HOST=') convox-dev`

And then do `convox start` again against this new docker installation.

If you're running Docker yourself, just pass the `REGISTRY_HOST` as the option to `--insecure-registry` when starting
the docker daemon.


## Contributing

* Open a [GitHub Issue](https://github.com/convox/rack/issues/new) for bugs and feature requests
Expand Down

0 comments on commit e5e7b83

Please sign in to comment.