|
| 1 | +ApacheCon NA 2016 demo |
| 2 | +====================== |
| 3 | + |
| 4 | +The ACNA 2016 demo is an application that deploys nodes to a given cloud provider, and uses |
| 5 | +[Chef](http://chef.io) for configuration management and service discovery. If you don't have a Chef Server, you can try this demo for free with a [Hosted Chef] account. |
| 6 | + |
| 7 | +## Configuring the Chef Server |
| 8 | + |
| 9 | +First of all, the Chef Server must have the cookbooks and roles that will be used in this example |
| 10 | +application. In order to do that, you need to have the `knife CLI` installed on route machine. If you don't have it, you can download and install Chef from [here](<chef download link>). |
| 11 | + |
| 12 | +Once the Chef CLI is installed, you can upload everything to the Chef Server as follows: |
| 13 | + |
| 14 | +```bash |
| 15 | +gem install Berkshelf # Cookbook manager used to manage cookbook dependencies |
| 16 | +cd chef |
| 17 | +berks install # Download the cookbooks and their dependencies |
| 18 | +berks upload -a # Upload everything to the Chef Server |
| 19 | +``` |
| 20 | + |
| 21 | +Once the cookbooks are installed, the roles and environments need to be uploaded: |
| 22 | + |
| 23 | +```bash |
| 24 | +knife environment from file environments/* |
| 25 | +knife role from file roles/* |
| 26 | +``` |
| 27 | + |
| 28 | +Now the Chef Server has all it needs for the demo. |
| 29 | + |
| 30 | +## Configuring the connection to the cloud providers |
| 31 | + |
| 32 | +To configure the connection to a cloud provider, create a file in the format `<provider-id>.properties` in the `src/main/resources` directory. The file must contain two keys: |
| 33 | + |
| 34 | +* <provider-id>.identity = <identity used to connect to the provider> |
| 35 | +* <provider-id>.credential = <credential used to connect to the provider> |
| 36 | + |
| 37 | +Values can also be path to files that contain the credential. This makes it easier to provide |
| 38 | +private keys, and avoids exposing the credentials if the file is uploaded to a version control |
| 39 | +system. |
| 40 | + |
| 41 | +You will also have to change the `chef.properties` file to point to your Chef Server. |
0 commit comments