kite 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +130 -66
- data/LICENSE.md +202 -0
- data/README.md +35 -11
- data/bin/concourse/out +16 -20
- data/docs/kite-concourse-resource.md +45 -0
- data/kite.gemspec +1 -0
- data/lib/kite.rb +3 -1
- data/lib/kite/cloud.rb +1 -0
- data/lib/kite/core.rb +8 -2
- data/lib/kite/generate.rb +12 -46
- data/lib/kite/helpers.rb +0 -72
- data/lib/kite/helpers/concourse.rb +3 -2
- data/lib/kite/module.rb +76 -0
- data/lib/kite/terraform.rb +45 -0
- data/lib/kite/version.rb +1 -1
- data/tpl/aws/environment/main.tf.tt +5 -0
- data/tpl/aws/environment/s3.tf.tt +13 -0
- data/tpl/gcp/environment/gcs.tf.tt +18 -0
- data/tpl/gcp/environment/main.tf.tt +5 -0
- data/tpl/gcp/environment/outputs.tf.tt +5 -0
- data/tpl/service/%output_path%/pipelines/review.yml.tt +55 -37
- data/tpl/service/%output_path%/pipelines/tasks/create-pull-requests-tag.yml.tt +1 -1
- data/tpl/service/%output_path%/pipelines/tasks/create-repository-tag.yml.tt +1 -1
- data/tpl/service/%output_path%/pipelines/tasks/run-unit.yml.tt +7 -0
- data/tpl/service/Makefile.tt +11 -7
- data/tpl/service/docs/getting-started.md +73 -0
- data/tpl/service/docs/service.md +101 -0
- data/tpl/skel/Gemfile.tt +0 -9
- data/tpl/skel/config/cloud.yml +11 -66
- metadata +29 -88
- data/lib/kite/render.rb +0 -116
- data/tpl/aws/README.md +0 -52
- data/tpl/aws/bin/base/bootstrap.sh +0 -35
- data/tpl/aws/bin/base/cleanup.sh.tt +0 -19
- data/tpl/aws/bin/base/set-env.sh.tt +0 -7
- data/tpl/aws/bin/base/setup-tunnel.sh.tt +0 -4
- data/tpl/aws/bin/bosh-install.sh.tt +0 -23
- data/tpl/aws/bin/concourse-deploy.sh.tt +0 -14
- data/tpl/aws/bin/ingress-deploy.sh.tt +0 -7
- data/tpl/aws/bin/ingress-update.sh.tt +0 -7
- data/tpl/aws/bin/kops-delete.sh.erb +0 -5
- data/tpl/aws/bin/kops-deploy.sh.erb +0 -11
- data/tpl/aws/bin/oauth-deploy.sh.tt +0 -17
- data/tpl/aws/bin/prometheus-deploy.sh.tt +0 -23
- data/tpl/aws/bin/vault-deploy.sh.tt +0 -10
- data/tpl/aws/bosh-vars.yml.erb +0 -12
- data/tpl/aws/config/oauth.yml +0 -59
- data/tpl/aws/deployments/bosh/bosh.yml +0 -144
- data/tpl/aws/deployments/bosh/cloud-config.yml.tt +0 -86
- data/tpl/aws/deployments/bosh/cpi.yml +0 -98
- data/tpl/aws/deployments/bosh/jumpbox-user.yml +0 -27
- data/tpl/aws/deployments/concourse/concourse.yml.tt +0 -98
- data/tpl/aws/deployments/ingress/ingress.yml.erb +0 -78
- data/tpl/aws/deployments/oauth/oauth.yml.tt +0 -95
- data/tpl/aws/deployments/prometheus/monitor-bosh.yml +0 -518
- data/tpl/aws/deployments/prometheus/monitor-kubernetes.yml +0 -30
- data/tpl/aws/deployments/prometheus/prometheus.yml.tt +0 -184
- data/tpl/aws/deployments/vault/vault.yml.erb +0 -38
- data/tpl/aws/docs/bosh.md +0 -31
- data/tpl/aws/docs/concourse.md +0 -41
- data/tpl/aws/docs/ingress.md +0 -14
- data/tpl/aws/docs/kops.md +0 -35
- data/tpl/aws/docs/oauth.md +0 -24
- data/tpl/aws/docs/prometheus.md +0 -31
- data/tpl/aws/docs/vault.md +0 -35
- data/tpl/aws/terraform/kite_bucket.tf +0 -8
- data/tpl/aws/terraform/main.tf.tt +0 -36
- data/tpl/aws/terraform/network.tf.tt +0 -252
- data/tpl/aws/terraform/outputs.tf +0 -19
- data/tpl/aws/terraform/terraform.tfvars.tt +0 -21
- data/tpl/aws/terraform/variables.tf +0 -73
- data/tpl/gcp/README.md +0 -54
- data/tpl/gcp/bin/base/bootstrap.sh +0 -35
- data/tpl/gcp/bin/base/cleanup.sh.tt +0 -20
- data/tpl/gcp/bin/base/set-env.sh.tt +0 -10
- data/tpl/gcp/bin/base/setup-tunnel.sh.tt +0 -13
- data/tpl/gcp/bin/bosh-install.sh.tt +0 -22
- data/tpl/gcp/bin/concourse-deploy.sh.tt +0 -14
- data/tpl/gcp/bin/ingress-deploy.sh.tt +0 -7
- data/tpl/gcp/bin/ingress-update.sh.tt +0 -7
- data/tpl/gcp/bin/oauth-deploy.sh.tt +0 -19
- data/tpl/gcp/bin/prometheus-deploy.sh.tt +0 -23
- data/tpl/gcp/bin/vault-deploy.sh.tt +0 -10
- data/tpl/gcp/bosh-vars.yml.erb +0 -9
- data/tpl/gcp/config/oauth.yml +0 -59
- data/tpl/gcp/deployments/bosh/bosh.yml +0 -144
- data/tpl/gcp/deployments/bosh/cloud-config.yml.tt +0 -73
- data/tpl/gcp/deployments/bosh/cpi.yml +0 -69
- data/tpl/gcp/deployments/bosh/jumpbox-user.yml +0 -27
- data/tpl/gcp/deployments/concourse/concourse.yml.tt +0 -104
- data/tpl/gcp/deployments/concourse/test/test-credentials.yml +0 -3
- data/tpl/gcp/deployments/concourse/test/test-pipeline.yml +0 -24
- data/tpl/gcp/deployments/ingress/ingress.yml.erb +0 -111
- data/tpl/gcp/deployments/oauth/oauth.yml.tt +0 -95
- data/tpl/gcp/deployments/prometheus/monitor-bosh.yml +0 -518
- data/tpl/gcp/deployments/prometheus/monitor-kubernetes.yml +0 -30
- data/tpl/gcp/deployments/prometheus/prometheus.yml +0 -183
- data/tpl/gcp/deployments/vault/vault.yml.erb +0 -37
- data/tpl/gcp/docs/bosh.md +0 -36
- data/tpl/gcp/docs/concourse.md +0 -41
- data/tpl/gcp/docs/ingress.md +0 -12
- data/tpl/gcp/docs/oauth.md +0 -24
- data/tpl/gcp/docs/prometheus.md +0 -27
- data/tpl/gcp/docs/vault.md +0 -36
- data/tpl/gcp/terraform/gcs.tf.tt +0 -18
- data/tpl/gcp/terraform/main.tf +0 -70
- data/tpl/gcp/terraform/network.tf +0 -52
- data/tpl/gcp/terraform/outputs.tf +0 -7
- data/tpl/gcp/terraform/terraform.tfvars.tt +0 -15
- data/tpl/gcp/terraform/variables.tf +0 -37
- data/tpl/service/%output_path%/pipelines/tasks/helm-deploy.yml.tt +0 -22
- data/tpl/service/%output_path%/pipelines/tasks/run-master-tests.yml.tt +0 -12
- data/tpl/service/%output_path%/pipelines/tasks/run-pr-tests.yml.tt +0 -12
- data/tpl/skel/docs/index.md.tt +0 -0
- data/tpl/skel/docs/quickstart.md.tt +0 -0
data/tpl/gcp/terraform/main.tf
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
provider "google" {
|
2
|
-
credentials = "${file("${var.credentials}")}"
|
3
|
-
project = "${var.project}"
|
4
|
-
region = "${var.region}"
|
5
|
-
version = "= 0.1.3"
|
6
|
-
}
|
7
|
-
|
8
|
-
# Allow SSH to Platform Bastion
|
9
|
-
resource "google_compute_firewall" "bastion" {
|
10
|
-
name = "bastion-rules"
|
11
|
-
network = "${google_compute_network.platform.name}"
|
12
|
-
|
13
|
-
allow {
|
14
|
-
protocol = "icmp"
|
15
|
-
}
|
16
|
-
|
17
|
-
allow {
|
18
|
-
protocol = "tcp"
|
19
|
-
ports = ["22"]
|
20
|
-
}
|
21
|
-
|
22
|
-
target_tags = ["bastion"]
|
23
|
-
}
|
24
|
-
|
25
|
-
# Bastion host
|
26
|
-
resource "google_compute_address" "bastion" {
|
27
|
-
name = "bastion-ip"
|
28
|
-
}
|
29
|
-
|
30
|
-
resource "google_compute_instance" "bastion" {
|
31
|
-
name = "bastion"
|
32
|
-
machine_type = "g1-small"
|
33
|
-
zone = "${var.zone}"
|
34
|
-
|
35
|
-
tags = ["bastion", "platform-internal"]
|
36
|
-
|
37
|
-
boot_disk {
|
38
|
-
initialize_params {
|
39
|
-
image = "debian-cloud/debian-8"
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
network_interface {
|
44
|
-
subnetwork = "${google_compute_subnetwork.platform_net.name}"
|
45
|
-
access_config {
|
46
|
-
nat_ip = "${google_compute_address.bastion.address}"
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
can_ip_forward = true
|
51
|
-
|
52
|
-
metadata {
|
53
|
-
sshKeys = "kite:${file(var.public_key)}"
|
54
|
-
}
|
55
|
-
|
56
|
-
metadata_startup_script = <<EOT
|
57
|
-
#!/bin/bash
|
58
|
-
sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
59
|
-
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
60
|
-
EOT
|
61
|
-
|
62
|
-
service_account {
|
63
|
-
scopes = ["userinfo-email", "compute-ro", "storage-ro"]
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
|
-
# Ingress
|
68
|
-
resource "google_compute_address" "ingress" {
|
69
|
-
name = "ingress-ip"
|
70
|
-
}
|
@@ -1,52 +0,0 @@
|
|
1
|
-
resource "google_compute_network" "platform" {
|
2
|
-
name = "${var.vpc_name}"
|
3
|
-
}
|
4
|
-
|
5
|
-
# Subnet for the Platform tools
|
6
|
-
resource "google_compute_subnetwork" "platform_net" {
|
7
|
-
name = "${var.platform_subnet_name}"
|
8
|
-
ip_cidr_range = "${var.subnet_cidr}"
|
9
|
-
network = "${google_compute_network.platform.self_link}"
|
10
|
-
}
|
11
|
-
|
12
|
-
resource "google_compute_route" "platform-gate" {
|
13
|
-
name = "platform-gate"
|
14
|
-
dest_range = "0.0.0.0/0"
|
15
|
-
network = "${google_compute_network.platform.name}"
|
16
|
-
next_hop_instance = "${google_compute_instance.bastion.name}"
|
17
|
-
next_hop_instance_zone = "${var.zone}"
|
18
|
-
priority = 800
|
19
|
-
tags = ["no-ip"]
|
20
|
-
project = "${var.project}"
|
21
|
-
}
|
22
|
-
|
23
|
-
# Allow open access between internal VM
|
24
|
-
resource "google_compute_firewall" "platform_internal" {
|
25
|
-
name = "platform-internal"
|
26
|
-
network = "${google_compute_network.platform.name}"
|
27
|
-
|
28
|
-
allow {
|
29
|
-
protocol = "icmp"
|
30
|
-
}
|
31
|
-
|
32
|
-
allow {
|
33
|
-
protocol = "tcp"
|
34
|
-
}
|
35
|
-
|
36
|
-
allow {
|
37
|
-
protocol = "udp"
|
38
|
-
}
|
39
|
-
target_tags = ["platform-internal"]
|
40
|
-
source_tags = ["platform-internal"]
|
41
|
-
}
|
42
|
-
|
43
|
-
# Allow concourse
|
44
|
-
resource "google_compute_firewall" "allow_concourse" {
|
45
|
-
name = "allow-concourse"
|
46
|
-
network = "${google_compute_network.platform.name}"
|
47
|
-
|
48
|
-
allow {
|
49
|
-
protocol = "all"
|
50
|
-
}
|
51
|
-
|
52
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# Kite config
|
2
|
-
keypair_name = "<%= @values['kite']['keypair_name'] %>"
|
3
|
-
public_key = "<%= @values['kite']['public_key_path'] %>"
|
4
|
-
private_key = "<%= @values['kite']['private_key_path'] %>"
|
5
|
-
|
6
|
-
# Credentials
|
7
|
-
credentials = "<%= @values['gcp']['service_account'] %>"
|
8
|
-
project = "<%= @values['gcp']['project'] %>"
|
9
|
-
region = "<%= @values['gcp']['region'] %>"
|
10
|
-
zone = "<%= @values['gcp']['zone'] %>"
|
11
|
-
|
12
|
-
# Network Config
|
13
|
-
vpc_name = "<%= @values['gcp']['vpc_name'] %>"
|
14
|
-
platform_subnet_name = "<%= @values['gcp']['subnet_name'] %>"
|
15
|
-
subnet_cidr = "<%= @values['gcp']['subnet_cidr'] %>"
|
@@ -1,37 +0,0 @@
|
|
1
|
-
|
2
|
-
variable "project" {
|
3
|
-
type = "string"
|
4
|
-
}
|
5
|
-
|
6
|
-
variable "region" {
|
7
|
-
type = "string"
|
8
|
-
default = "us-east1"
|
9
|
-
}
|
10
|
-
|
11
|
-
variable "zone" {
|
12
|
-
type = "string"
|
13
|
-
default = "us-east1-d"
|
14
|
-
}
|
15
|
-
|
16
|
-
variable "credentials" {
|
17
|
-
type = "string"
|
18
|
-
}
|
19
|
-
|
20
|
-
variable "vpc_name" {
|
21
|
-
type = "string"
|
22
|
-
default = "platform-tools"
|
23
|
-
}
|
24
|
-
|
25
|
-
variable "platform_subnet_name" {
|
26
|
-
type = "string"
|
27
|
-
default = "platform-net"
|
28
|
-
}
|
29
|
-
|
30
|
-
variable "subnet_cidr" {
|
31
|
-
type = "string"
|
32
|
-
default = "10.0.0.0/24"
|
33
|
-
}
|
34
|
-
|
35
|
-
variable "public_key" {
|
36
|
-
type = "string"
|
37
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
---
|
2
|
-
platform: linux
|
3
|
-
|
4
|
-
image_resource:
|
5
|
-
type: docker-image
|
6
|
-
source:
|
7
|
-
repository: heliostech/kite
|
8
|
-
|
9
|
-
inputs:
|
10
|
-
- name: <%= @name %>-repository
|
11
|
-
|
12
|
-
run:
|
13
|
-
path: "sh"
|
14
|
-
args:
|
15
|
-
- "-exc"
|
16
|
-
- |
|
17
|
-
helm init --client-only
|
18
|
-
echo ${GOOGLE_APPLICATION_JSON} > gcr_credentials.json
|
19
|
-
export GOOGLE_APPLICATION_CREDENTIALS="${PWD}/gcr_credentials.json"
|
20
|
-
echo ${KUBECONFIG_FILE} | tr -d ' ' | base64 -d > kubeconfig
|
21
|
-
export KUBECONFIG="${PWD}/kubeconfig"
|
22
|
-
helm install <%= @name %>-repository/.kite/charts/<%= @name %>
|
data/tpl/skel/docs/index.md.tt
DELETED
File without changes
|
File without changes
|