kite 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '0499a1f48e1e1ff191047b0a757469b537cebf0a'
4
- data.tar.gz: c562a68c9cf7c851f5088ac6413a2b7d756e0c65
3
+ metadata.gz: e147a21c1ce86a6b496f71c358b65d0f135fd150
4
+ data.tar.gz: 9778352a81fd5503e02d63cccd30258259ecfb9e
5
5
  SHA512:
6
- metadata.gz: cd0754e76c673d8001452b1c053d76c2e4053d0ce916b5df8ab18a2dc92212c5d3e359376cd70df6d5e1160ee33a5f9529cc5f626eb2e926747cb452d1421f70
7
- data.tar.gz: 071f54533c2228073440213c31145e42668c510de0fe377f15950fd0c93614575a16abc8a69df9b8e1bf88d553f898c7821a3fe4db5f0991c80529fd98a0dd65
6
+ metadata.gz: 7b73426bd0445b7d1cc51962ec5b6b0f56d801d0172d8802171638c1481c6e11cb9aaeaaa2c2ad0684a211a8b0fac6c7808920d3e306a6b4df16e28a94e2e769
7
+ data.tar.gz: b57f47dd619107714edae4673659520eb128e185c8c29ce5aee3b5a231005133b61569615a57e08d76ef7023526020fb5cb3b8f9e638e4403c98caa73e2b14ef
@@ -1,8 +1,7 @@
1
1
  # Change Log
2
2
 
3
- ## [Unreleased](https://github.com/helios-technologies/kite/tree/HEAD)
4
-
5
- [Full Changelog](https://github.com/helios-technologies/kite/compare/v0.0.8...HEAD)
3
+ ## [v0.0.9](https://github.com/helios-technologies/kite/tree/v0.0.9) (2017-09-29)
4
+ [Full Changelog](https://github.com/helios-technologies/kite/compare/v0.0.8...v0.0.9)
6
5
 
7
6
  **Closed issues:**
8
7
 
@@ -84,5 +83,3 @@
84
83
 
85
84
  ## [v0.0.2](https://github.com/helios-technologies/kite/tree/v0.0.2) (2017-08-24)
86
85
 
87
-
88
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/README.md CHANGED
@@ -46,10 +46,10 @@ $ kite new PROJECT_NAME
46
46
 
47
47
  ### Generate your infrastructure using terraform
48
48
 
49
- Generate the cloud IaC needed with
49
+ Generate the cloud IaC needed with
50
50
 
51
51
  ```
52
- $ kite generate --cloud=aws|gcp
52
+ $ kite generate cloud --provider=aws|gcp
53
53
  ```
54
54
 
55
55
  you can now review and apply your terraform files.
@@ -14,10 +14,12 @@ module Kite
14
14
  when 'aws'
15
15
  directory('aws/terraform', 'terraform')
16
16
  copy_file('aws/README.md', 'README.md', force: true)
17
+ copy_file('aws/docs/kops.md', 'docs/kops.md')
17
18
 
18
19
  directory('aws/bin/base', 'bin')
19
20
  chmod('bin/bootstrap.sh', 0755)
20
21
  chmod('bin/cleanup.sh', 0755)
22
+ chmod('bin/setup-tunnel.sh', 0755)
21
23
 
22
24
  when 'gcp'
23
25
  directory('gcp/terraform', 'terraform')
@@ -27,6 +29,7 @@ module Kite
27
29
  directory('gcp/bin/base', 'bin')
28
30
  chmod('bin/bootstrap.sh', 0755)
29
31
  chmod('bin/cleanup.sh', 0755)
32
+ chmod('bin/setup-tunnel.sh', 0755)
30
33
 
31
34
  else
32
35
  say 'Cloud provider not specified'
@@ -1,3 +1,3 @@
1
1
  module Kite
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -7,6 +7,9 @@ Apply terraform code
7
7
  pushd terraform && terraform init && terraform apply && popd
8
8
  ```
9
9
 
10
+ [Note]
11
+ To destroy Bastion later, use `terraform destroy -target aws_instance.bastion`
12
+
10
13
  Render BOSH manifest and related files
11
14
  ```
12
15
  kite render manifest bosh --cloud aws
@@ -16,4 +16,4 @@ bosh delete-env deployments/bosh/bosh.yml \
16
16
  pushd terraform && terraform destroy && popd
17
17
 
18
18
  # Remove files generated by kite
19
- rm -rf terraform deployments config/{creds.yml,bosh_vars.yml,jumpbox.key} bin/*.sh
19
+ rm -rf terraform deployments docs config/{creds.yml,bosh-vars.yml,jumpbox.key} bin/*.sh
@@ -2,13 +2,10 @@
2
2
 
3
3
  set -xe
4
4
 
5
- # Render Concourse-related files
6
- kite render manifest concourse --cloud aws
7
-
8
5
  # Upload necessary stemcells and releases
9
6
  bosh -e <%= @values['bosh']['name'] %> upload-stemcell https://bosh.io/d/stemcells/bosh-aws-xen-hvm-ubuntu-trusty-go_agent
10
7
  bosh -e <%= @values['bosh']['name'] %> upload-release https://bosh.io/d/github.com/concourse/concourse
11
8
  bosh -e <%= @values['bosh']['name'] %> upload-release https://bosh.io/d/github.com/cloudfoundry-incubator/garden-runc-release
12
9
 
13
10
  # Deploy Concourse
14
- bosh -e <%= @values['bosh']['name'] %> -d concourse deploy deployments/concourse/concourse.yml
11
+ bosh -e <%= @values['bosh']['name'] %> -d concourse deploy deployments/concourse/concourse.yml -v vault_token=$1
@@ -23,13 +23,13 @@ instance_groups:
23
23
  bind_port: 80
24
24
  external_url: <%= @values['concourse']['url'] %>
25
25
  basic_auth_username: <%= @values['concourse']['auth_username'] %>
26
- basic_auth_password: <%= @values['concourse']['auth_password'] %>
26
+ basic_auth_password: ((auth_password))
27
27
  publicly_viewable: true
28
28
 
29
29
  vault:
30
30
  auth:
31
31
  backend: token
32
- client_token: "your Vault root token here"
32
+ client_token: ((vault_token))
33
33
  path_prefix: /concourse
34
34
  url: "http://<%= @private_subnet[11] %>:8200" # assuming Vault is deployed first
35
35
 
@@ -53,7 +53,7 @@ instance_groups:
53
53
  databases:
54
54
  - name: *atc_db
55
55
  role: admin
56
- password: <%= @values['concourse']['db_password'] %>
56
+ password: ((db_password))
57
57
 
58
58
  - name: worker
59
59
  instances: 1
@@ -11,7 +11,7 @@
11
11
 
12
12
  Render bosh deployment
13
13
  ```
14
- kite render manifest bosh --cloud=gcp
14
+ kite render manifest bosh --cloud=aws
15
15
  ```
16
16
 
17
17
  Setup tunnel
@@ -10,9 +10,20 @@
10
10
 
11
11
  Fill out the "token" field in `deployments/concourse/concourse.yml` with root token received from `vault init`.
12
12
 
13
- Deploy Concourse
13
+ Deploy Concourse by running the script with the required arguments
14
14
  ```
15
- ./bin/concourse-deploy.sh
15
+ ./bin/concourse-deploy.sh *concourse_auth_password* *concourse_db_password* *vault_token*
16
+ ```
17
+
18
+ ### Connect GitHub oAuth
19
+
20
+ To configure GitHub oAuth, you'll first need to [create](https://developer.github.com/apps/building-integrations/setting-up-and-registering-oauth-apps/registering-oauth-apps) a GitHub oAuth app.
21
+
22
+ ```
23
+ fly set-team -n concourse \
24
+ --github-auth-client-id D \
25
+ --github-auth-client-secret $CLIENT_SECRET \
26
+ --github-auth-team concourse/Pivotal
16
27
  ```
17
28
 
18
29
  ### Test
@@ -0,0 +1,38 @@
1
+ #### KOPS
2
+
3
+ ### Prerequisites
4
+
5
+ - [kubectl](https://github.com/kubernetes/kops/blob/master/docs/install.md#kubectl) installed
6
+ - [kops](https://github.com/kubernetes/kops/blob/master/docs/install.md) client installed
7
+ - SSH key generated(needed for accessing cluster's master)
8
+ - Amazon S3 bucket for storing cluster's state created
9
+ - Route 53 domain for cluster access
10
+ - IAM user with correct policies:
11
+ - AmazonEC2FullAccess
12
+ - AmazonRoute53FullAccess
13
+ - AmazonS3FullAccess
14
+ - IAMFullAccess
15
+ - AmazonVPCFullAccess
16
+
17
+ ### Setup
18
+
19
+ Export AWS access keys and ID if you didn't before
20
+ ```
21
+ export AWS_ACCESS_KEY_ID=<access key>
22
+ export AWS_SECRET_ACCESS_KEY=<secret key>
23
+ ```
24
+
25
+ Create cluster configuration
26
+ ```
27
+ kops create cluster --name *kops.example.com* --state "s3://kops-example-state-store" --zones *eu-central-1b* --ssh-public-key *path to SSH key*
28
+ ```
29
+
30
+ Review and edit cluster configuration if needed
31
+ ```
32
+ kops edit cluster --name *kops.example.com* --state "s3://kops-example-state-store"
33
+ ```
34
+
35
+ Build the cluster
36
+ ```
37
+ kops update cluster --name *kops.example.com* --state "s3://kops-example-state-store" --yes
38
+ ```
@@ -16,7 +16,7 @@ To deploy Vault, use `./bin/vault-deploy.sh`
16
16
 
17
17
  ### Connection
18
18
 
19
- - Export your Vault's IP using `export VAULT_ADDR=*vault_ip*`
19
+ - Export your Vault's IP using `export VAULT_ADDR=http://*vault_ip*:8200`
20
20
  - Run `vault init` to initialize the vault
21
21
  - Store the keys displayed after init
22
22
  - Unseal the vault by running `vault unseal` three times using three keys from the previous step
@@ -31,3 +31,5 @@ To deploy Vault, use `./bin/vault-deploy.sh`
31
31
  Before using Vault with Concourse you should mount a secrets backend with `vault mount -path=concourse kv`
32
32
 
33
33
  To add new secrets accessible for Concourse use `vault write concourse/main/*secret_name* value="*secret_value*"`
34
+
35
+ #### It's recommended to create a separate token for Concourse by using `vault token-create`
@@ -7,11 +7,15 @@ Set path to your service account credentials:
7
7
  export GOOGLE_CREDENTIALS=*~/credentials/service-account.json*
8
8
  ```
9
9
 
10
+
10
11
  Apply terraform code
11
12
  ```
12
13
  pushd terraform && terraform init && terraform apply && popd
13
14
  ```
14
15
 
16
+ [Note]
17
+ To destroy Bastion later, use `terraform destroy -target google_compute_instance.bastion`
18
+
15
19
  Render BOSH manifest and related files
16
20
  ```
17
21
  kite render manifest bosh --cloud gcp
@@ -17,4 +17,4 @@ bosh delete-env deployments/bosh/bosh.yml \
17
17
  pushd terraform && terraform destroy && popd
18
18
 
19
19
  # Remove files generated by kite
20
- rm -rf terraform deployments config/{creds.yml,bosh_vars.yml,jumpbox.key} bin/*.sh
20
+ rm -rf terraform deployments docs config/{creds.yml,bosh_vars.yml,jumpbox.key} bin/*.sh
@@ -8,4 +8,4 @@ bosh -e <%= @values['bosh']['name'] %> upload-release https://github.com/concour
8
8
  bosh -e <%= @values['bosh']['name'] %> upload-release https://github.com/concourse/concourse/releases/download/v3.4.1/garden-runc-1.6.0.tgz
9
9
 
10
10
  # Deploy Concourse
11
- bosh -e <%= @values['bosh']['name'] %> -d concourse deploy deployments/concourse/concourse.yml
11
+ bosh -e <%= @values['bosh']['name'] %> -d concourse deploy deployments/concourse/concourse.yml -v auth_password=$1 -v db_password=$2 -v vault_token=$3
@@ -2,9 +2,6 @@
2
2
 
3
3
  set -xe
4
4
 
5
- # Render Concourse-related files
6
- kite render manifest vault --cloud gcp
7
-
8
5
  # Upload necessary stemcells and releases
9
6
  bosh -e <%= @values['bosh']['name'] %> upload-stemcell https://s3.amazonaws.com/bosh-core-stemcells/google/bosh-stemcell-3445.7-google-kvm-ubuntu-trusty-go_agent.tgz
10
7
  bosh -e <%= @values['bosh']['name'] %> upload-release https://bosh.io/d/github.com/cloudfoundry-community/vault-boshrelease
@@ -46,6 +46,8 @@ networks:
46
46
  subnetwork_name: <%= @values['gcp']['subnet_name'] %>
47
47
  ephemeral_external_ip: false
48
48
  tags:
49
+ - no-ip
50
+ - platform-internal
49
51
  - concourse-public
50
52
  - concourse-internal
51
53
 
@@ -25,13 +25,13 @@ instance_groups:
25
25
  bind_port: 80
26
26
  external_url: <%= @values['concourse']['url'] %>
27
27
  basic_auth_username: <%= @values['concourse']['auth_username'] %>
28
- basic_auth_password: <%= @values['concourse']['auth_password'] %>
28
+ basic_auth_password: ((auth_password))
29
29
  publicly_viewable: true
30
30
 
31
31
  vault:
32
32
  auth:
33
33
  backend: token
34
- client_token: "your Vault root token here"
34
+ client_token: ((vault_token))
35
35
  path_prefix: /concourse
36
36
  url: "http://<%= @private_subnet[11] %>:8200" # expecting Vault to be deployed first
37
37
 
@@ -55,7 +55,7 @@ instance_groups:
55
55
  databases:
56
56
  - name: *atc_db
57
57
  role: admin
58
- password: <%= @values['concourse']['db_password'] %>
58
+ password: ((db_password))
59
59
 
60
60
  - name: worker
61
61
  instances: 1
@@ -10,9 +10,20 @@
10
10
 
11
11
  Fill out the "token" field in `deployments/concourse/concourse.yml` with root token received from `vault init`.
12
12
 
13
- Deploy Concourse
13
+ Deploy Concourse by running the script with the required arguments
14
14
  ```
15
- ./bin/concourse-deploy.sh
15
+ ./bin/concourse-deploy.sh *concourse_auth_password* *concourse_db_password* *vault_token*
16
+ ```
17
+
18
+ ### Connect GitHub oAuth
19
+
20
+ To configure GitHub oAuth, you'll first need to [create](https://developer.github.com/apps/building-integrations/setting-up-and-registering-oauth-apps/registering-oauth-apps) a GitHub oAuth app.
21
+
22
+ ```
23
+ fly set-team -n concourse \
24
+ --github-auth-client-id D \
25
+ --github-auth-client-secret $CLIENT_SECRET \
26
+ --github-auth-team concourse/Pivotal
16
27
  ```
17
28
 
18
29
  ### Test
@@ -16,7 +16,7 @@ To deploy Vault, use `./bin/vault-deploy.sh`
16
16
 
17
17
  ### Connection
18
18
 
19
- - Export your Vault's IP using `export VAULT_ADDR=*vault_ip*`
19
+ - Export your Vault's IP using `export VAULT_ADDR=http://*vault_ip*:8200`
20
20
  - Run `vault init` to initialize the vault
21
21
  - Store the keys displayed after init
22
22
  - Unseal the vault by running `vault unseal` three times using three keys from the previous step
@@ -31,3 +31,5 @@ To deploy Vault, use `./bin/vault-deploy.sh`
31
31
  Before using Vault with Concourse you should mount a secrets backend with `vault mount -path=concourse kv`
32
32
 
33
33
  To add new secrets accessible for Concourse use `vault write concourse/main/*secret_name* value="*secret_value*"`
34
+
35
+ #### It's recommended to create a separate token for Concourse by using `vault token-create`
@@ -2,6 +2,7 @@ provider "google" {
2
2
  credentials = "${file("${var.credentials}")}"
3
3
  project = "${var.project}"
4
4
  region = "${var.region}"
5
+ version = "= 0.1.3"
5
6
  }
6
7
 
7
8
  # Allow SSH to Platform Bastion
@@ -1,4 +1,4 @@
1
1
  ## Generate a new cloud
2
2
  ```
3
- kite generate --cloud=<CLOUD_NAME>
3
+ kite generate cloud --provider=<CLOUD_PROVIDER>
4
4
  ```
@@ -39,5 +39,3 @@ concourse:
39
39
  hostname: "concourse.example.com"
40
40
  url: "http://concourse.example.com"
41
41
  auth_username: "concourse"
42
- auth_password: "concourse"
43
- db_password: "concourse"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis Bellet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-29 00:00:00.000000000 Z
11
+ date: 2017-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -143,6 +143,7 @@ files:
143
143
  - tpl/aws/deployments/vault/vault.yml.erb
144
144
  - tpl/aws/docs/bosh.md
145
145
  - tpl/aws/docs/concourse.md
146
+ - tpl/aws/docs/kops.md
146
147
  - tpl/aws/docs/vault.md
147
148
  - tpl/aws/terraform/main.tf.tt
148
149
  - tpl/aws/terraform/network.tf.tt