kite 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kite/core.rb +45 -28
- data/lib/kite/helpers.rb +7 -0
- data/lib/kite/version.rb +1 -1
- data/tpl/aws/bootstrap.sh +4 -7
- data/tpl/aws/{bin/make_manifest_bosh-init.sh → bosh/bosh_director.yml.erb} +22 -53
- data/tpl/aws/{bin/make_cloud_config.sh → concourse/aws_cloud.yml.erb} +3 -26
- data/tpl/aws/{bin/make_manifest_concourse-cluster.sh → concourse/concourse.yml.erb} +5 -20
- data/tpl/aws/terraform/main.tf +37 -0
- data/tpl/aws/terraform/network.tf +177 -0
- data/tpl/aws/terraform/outputs.tf +5 -5
- data/tpl/aws/terraform/terraform.tfvars.erb +18 -7
- data/tpl/aws/terraform/variables.tf +52 -18
- data/tpl/gcp/bosh-install.sh.erb +18 -0
- data/tpl/gcp/terraform/main.tf +56 -0
- data/tpl/gcp/terraform/network.tf +30 -0
- data/tpl/gcp/terraform/outputs.tf +3 -0
- data/tpl/gcp/terraform/terraform.tfvars.erb +14 -0
- data/tpl/gcp/terraform/variables.tf +32 -0
- data/tpl/skel/config/cloud.yml +22 -20
- metadata +13 -24
- data/tpl/aws/env.example.erb +0 -12
- data/tpl/aws/terraform/aws-concourse.tf +0 -127
- data/tpl/aws/terraform/aws-vault.tf +0 -26
- data/tpl/aws/terraform/bosh-aws-base.tf +0 -118
- data/tpl/gcp/INSTALL.md +0 -25
- data/tpl/gcp/README.md +0 -377
- data/tpl/gcp/cloud-config.yml.erb +0 -66
- data/tpl/gcp/concourse.tf +0 -62
- data/tpl/gcp/concourse.yml.erb +0 -101
- data/tpl/gcp/env.example.erb +0 -7
- data/tpl/gcp/main.tf +0 -107
- data/tpl/gcp/manifest.yml.erb +0 -173
- data/tpl/gcp/scripts/01_create_infrastructure.sh +0 -24
- data/tpl/gcp/scripts/02_deploy_director.sh +0 -35
- data/tpl/gcp/scripts/03_deploy_concourse.sh +0 -29
- data/tpl/gcp/scripts/04_delete_director.sh +0 -6
- data/tpl/gcp/scripts/05_delete_infrastructure.sh +0 -23
- data/tpl/gcp/scripts/bootstrap.sh +0 -22
- data/tpl/gcp/scripts/delete.sh +0 -16
@@ -1,24 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
if [ ! -f /tmp/terraform-bosh.key.json ]; then
|
4
|
-
gcloud iam service-accounts create terraform-bosh
|
5
|
-
|
6
|
-
gcloud iam service-accounts keys create /tmp/terraform-bosh.key.json \
|
7
|
-
--iam-account ${service_account_email}
|
8
|
-
|
9
|
-
gcloud projects add-iam-policy-binding ${projectid} \
|
10
|
-
--member serviceAccount:${service_account_email} \
|
11
|
-
--role roles/owner
|
12
|
-
fi
|
13
|
-
|
14
|
-
export GOOGLE_CREDENTIALS=$(cat /tmp/terraform-bosh.key.json)
|
15
|
-
|
16
|
-
docker run -i -t \
|
17
|
-
-e "GOOGLE_CREDENTIALS=${GOOGLE_CREDENTIALS}" \
|
18
|
-
-v `pwd`:/$(basename `pwd`) \
|
19
|
-
-w /$(basename `pwd`) \
|
20
|
-
hashicorp/terraform:light apply \
|
21
|
-
-var service_account_email=${service_account_email} \
|
22
|
-
-var projectid=${projectid} \
|
23
|
-
-var region=${region} \
|
24
|
-
-var zone-1=${zone}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
zone=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/zone)
|
4
|
-
export zone=${zone##*/}
|
5
|
-
export region=${zone%-*}
|
6
|
-
gcloud config set compute/zone ${zone}
|
7
|
-
gcloud config set compute/region ${region}
|
8
|
-
export project_id=`curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/project/project-id`
|
9
|
-
|
10
|
-
if [ ! -f ~/.ssh/bosh ]; then
|
11
|
-
ssh-keygen -t rsa -f ~/.ssh/bosh -C bosh
|
12
|
-
|
13
|
-
echo "------------------~/.ssh/bosh.pub------------------"
|
14
|
-
cat ~/.ssh/bosh.pub
|
15
|
-
echo "---------------------------------------------------"
|
16
|
-
|
17
|
-
echo "Navigate to your project's web console and add the new SSH public key by pasting the contents of ~/.ssh/bosh.pub:"
|
18
|
-
read -p "Press [Enter] to continue..."
|
19
|
-
fi
|
20
|
-
|
21
|
-
export ssh_key_path=$HOME/.ssh/bosh
|
22
|
-
|
23
|
-
while ! bosh-init -v; do
|
24
|
-
echo "bosh-init is not ready yet..."
|
25
|
-
sleep 5
|
26
|
-
done
|
27
|
-
|
28
|
-
mkdir google-bosh-director
|
29
|
-
cd google-bosh-director
|
30
|
-
|
31
|
-
cp ~/gcp/manifest.yml manifest.yml
|
32
|
-
|
33
|
-
bosh-init deploy manifest.yml
|
34
|
-
|
35
|
-
bosh target 10.0.0.6
|
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
zone=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/zone)
|
4
|
-
export zone=${zone##*/}
|
5
|
-
export region=${zone%-*}
|
6
|
-
gcloud config set compute/zone ${zone}
|
7
|
-
gcloud config set compute/region ${region}
|
8
|
-
export project_id=`curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/project/project-id`
|
9
|
-
|
10
|
-
export ssh_key_path=$HOME/.ssh/bosh
|
11
|
-
|
12
|
-
bosh upload stemcell https://bosh.io/d/stemcells/bosh-google-kvm-ubuntu-trusty-go_agent?v=3263.8
|
13
|
-
|
14
|
-
bosh upload release https://bosh.io/d/github.com/concourse/concourse?v=2.5.0
|
15
|
-
bosh upload release https://bosh.io/d/github.com/cloudfoundry/garden-runc-release?v=1.0.3
|
16
|
-
|
17
|
-
export external_ip=`gcloud compute addresses describe concourse | grep ^address: | cut -f2 -d' '`
|
18
|
-
export director_uuid=`bosh status --uuid 2>/dev/null`
|
19
|
-
|
20
|
-
openssl rand -base64 16 > ~/common_password
|
21
|
-
cp ~/common_password ~/atc_password
|
22
|
-
|
23
|
-
export common_password=$(cat ~/common_password)
|
24
|
-
export atc_password=$(cat ~/atc_password)
|
25
|
-
|
26
|
-
bosh update cloud-config ~/gcp/cloud-config.yml
|
27
|
-
|
28
|
-
bosh deployment ~/gcp/concourse.yml
|
29
|
-
bosh deploy
|
@@ -1,23 +0,0 @@
|
|
1
|
-
export projectid=helios-devel
|
2
|
-
export region=europe-west1
|
3
|
-
export zone=europe-west1-b
|
4
|
-
export service_account_email=terraform-bosh@${projectid}.iam.gserviceaccount.com
|
5
|
-
|
6
|
-
export GOOGLE_CREDENTIALS=$(cat /tmp/terraform-bosh.key.json)
|
7
|
-
|
8
|
-
docker run -i -t \
|
9
|
-
-e "GOOGLE_CREDENTIALS=${GOOGLE_CREDENTIALS}" \
|
10
|
-
-v `pwd`:/$(basename `pwd`) \
|
11
|
-
-w /$(basename `pwd`) \
|
12
|
-
hashicorp/terraform:light destroy \
|
13
|
-
-var service_account_email=${service_account_email} \
|
14
|
-
-var projectid=${projectid} \
|
15
|
-
-var region=${region} \
|
16
|
-
-var zone-1=${zone}
|
17
|
-
|
18
|
-
gcloud projects remove-iam-policy-binding ${projectid} \
|
19
|
-
--member serviceAccount:${service_account_email} \
|
20
|
-
--role roles/owner
|
21
|
-
|
22
|
-
gcloud iam service-accounts delete ${service_account_email}
|
23
|
-
rm /tmp/terraform-bosh.key.json
|
@@ -1,22 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
source .env
|
4
|
-
|
5
|
-
if ! gcloud auth list | grep @heliostech.fr; then
|
6
|
-
gcloud auth login
|
7
|
-
fi
|
8
|
-
|
9
|
-
gcloud config set project ${projectid}
|
10
|
-
gcloud config set compute/zone ${zone}
|
11
|
-
gcloud config set compute/region ${region}
|
12
|
-
|
13
|
-
source scripts/01_create_infrastructure.sh
|
14
|
-
|
15
|
-
# ${bastion_vm_name} ssh timeout
|
16
|
-
sleep 10
|
17
|
-
|
18
|
-
gcloud compute scp --scp-flag=-r . ${bastion_vm_name}:$HOME/gcp
|
19
|
-
|
20
|
-
gcloud compute ssh ${bastion_vm_name} -- source gcp/scripts/02_deploy_director.sh
|
21
|
-
|
22
|
-
gcloud compute ssh ${bastion_vm_name} -- source gcp/scripts/03_deploy_concourse.sh
|
data/tpl/gcp/scripts/delete.sh
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
source .env
|
4
|
-
|
5
|
-
if ! gcloud auth list | grep @heliostech.fr; then
|
6
|
-
gcloud auth login
|
7
|
-
gcloud config set project ${projectid}
|
8
|
-
gcloud config set compute/zone ${zone}
|
9
|
-
gcloud config set compute/region ${region}
|
10
|
-
fi
|
11
|
-
|
12
|
-
gcloud compute scp --scp-flag=-r . ${bastion_vm_name}:$HOME/gcp
|
13
|
-
|
14
|
-
gcloud compute ssh ${bastion_vm_name} -- source gcp/scripts/04_delete_director.sh
|
15
|
-
|
16
|
-
source scripts/05_delete_infrastructure.sh
|