Skip to content

Commit 53fd698

Browse files
committed
Added Chef config skeleton and README
1 parent 931cbee commit 53fd698

File tree

3 files changed

+55
-3
lines changed

3 files changed

+55
-3
lines changed

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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.

chef/Berksfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
source 'https://supermarket.chef.io'
2+
3+
cookbook 'apache2', '~> 3.2.2'
4+
5+
# The HAProxy cookbook does not properly read the ip address of the nodes
6+
# in some clouds (issue COOK<ref>). This branch containst a temporal patch
7+
# that can be used until the bug is fixed.
8+
cookbook 'haproxy', :git => 'https://github.com/nacx/haproxy

pom.xml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22
<modelVersion>4.0.0</modelVersion>
3+
34
<groupId>org.apache.jclouds</groupId>
45
<artifactId>acna2016-demo</artifactId>
56
<version>0.0.1-SNAPSHOT</version>
@@ -33,14 +34,16 @@
3334
</dependency>
3435
<dependency>
3536
<groupId>org.apache.jclouds.provider</groupId>
36-
<artifactId>aws-ec2</artifactId>
37+
<artifactId>digitalocean2</artifactId>
3738
<version>${jclouds.version}</version>
3839
</dependency>
40+
<!-- Uncomment to have access to all compute providers
3941
<dependency>
40-
<groupId>org.apache.jclouds.provider</groupId>
41-
<artifactId>digitalocean2</artifactId>
42+
<groupId>org.apache.jclouds</groupId>
43+
<artifactId>jclouds-allcompute</artifactId>
4244
<version>${jclouds.version}</version>
4345
</dependency>
46+
-->
4447

4548
<!-- Drivers -->
4649
<dependency>

0 commit comments

Comments
 (0)