re-structured

This commit is contained in:
Tyler Bird 2018-04-08 18:36:22 -06:00
parent 3fcd93ccbb
commit faf2daac01
32 changed files with 3163 additions and 0 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
# Desktop Services Store
.DS_Store
# Google Cloud Service Account Key
*.key.json

View File

@ -0,0 +1 @@
For the instructor, this is what you'll do to help students be ready to do lab 0.

View File

@ -1,5 +1,7 @@
# lab 1
For the instructor, this is what you'll do to help students be ready to do lab 0.
What is the purpose of this lab?
It is to show how bosh can be used to deploy bosh. That's freaking awesome.

View File

@ -0,0 +1 @@
For the instructor, this is what you'll do to help students be ready to do lab 2.

View File

@ -0,0 +1 @@
For the instructor, this is what you'll do to help students be ready to do lab 3.

View File

@ -0,0 +1 @@
For the instructor, this is what you'll do to help students be ready to do lab 4.

View File

@ -0,0 +1,18 @@
#!/bin/sh
bosh create-env \
${BBL_STATE_DIR}/bosh-deployment/bosh.yml \
--state ${BBL_STATE_DIR}/vars/bosh-state.json \
--vars-store ${BBL_STATE_DIR}/vars/director-vars-store.yml \
--vars-file ${BBL_STATE_DIR}/vars/director-vars-file.yml \
--var-file gcp_credentials_json="${BBL_GCP_SERVICE_ACCOUNT_KEY_PATH}" \
-v project_id="${BBL_GCP_PROJECT_ID}" \
-v zone="${BBL_GCP_ZONE}" \
-o ${BBL_STATE_DIR}/bosh-deployment/gcp/cpi.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/jumpbox-user.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/uaa.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/credhub.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/bosh-lite.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/bosh-lite-runc.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/gcp/bosh-lite-vm-type.yml \
-o ${BBL_STATE_DIR}/external-ip-gcp.yml \
-o ${BBL_STATE_DIR}/ip-forwarding.yml

View File

@ -0,0 +1,11 @@
#!/bin/sh
bosh create-env \
${BBL_STATE_DIR}/jumpbox-deployment/jumpbox.yml \
--state ${BBL_STATE_DIR}/vars/jumpbox-state.json \
--vars-store ${BBL_STATE_DIR}/vars/jumpbox-vars-store.yml \
--vars-file ${BBL_STATE_DIR}/vars/jumpbox-vars-file.yml \
--var-file gcp_credentials_json="${BBL_GCP_SERVICE_ACCOUNT_KEY_PATH}" \
-v project_id="${BBL_GCP_PROJECT_ID}" \
-v zone="${BBL_GCP_ZONE}" \
-o ${BBL_STATE_DIR}/jumpbox-deployment/gcp/cpi.yml \
-o ${BBL_STATE_DIR}/ip-forwarding.yml

View File

@ -0,0 +1,18 @@
#!/bin/sh
bosh delete-env \
${BBL_STATE_DIR}/bosh-deployment/bosh.yml \
--state ${BBL_STATE_DIR}/vars/bosh-state.json \
--vars-store ${BBL_STATE_DIR}/vars/director-vars-store.yml \
--vars-file ${BBL_STATE_DIR}/vars/director-vars-file.yml \
--var-file gcp_credentials_json="${BBL_GCP_SERVICE_ACCOUNT_KEY_PATH}" \
-v project_id="${BBL_GCP_PROJECT_ID}" \
-v zone="${BBL_GCP_ZONE}" \
-o ${BBL_STATE_DIR}/bosh-deployment/gcp/cpi.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/jumpbox-user.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/uaa.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/credhub.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/bosh-lite.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/bosh-lite-runc.yml \
-o ${BBL_STATE_DIR}/bosh-deployment/gcp/bosh-lite-vm-type.yml \
-o ${BBL_STATE_DIR}/external-ip-gcp.yml \
-o ${BBL_STATE_DIR}/ip-forwarding.yml

View File

@ -0,0 +1,11 @@
#!/bin/sh
bosh delete-env \
${BBL_STATE_DIR}/jumpbox-deployment/jumpbox.yml \
--state ${BBL_STATE_DIR}/vars/jumpbox-state.json \
--vars-store ${BBL_STATE_DIR}/vars/jumpbox-vars-store.yml \
--vars-file ${BBL_STATE_DIR}/vars/jumpbox-vars-file.yml \
--var-file gcp_credentials_json="${BBL_GCP_SERVICE_ACCOUNT_KEY_PATH}" \
-v project_id="${BBL_GCP_PROJECT_ID}" \
-v zone="${BBL_GCP_ZONE}" \
-o ${BBL_STATE_DIR}/jumpbox-deployment/gcp/cpi.yml \
-o ${BBL_STATE_DIR}/ip-forwarding.yml

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
# Adapted from bosh-deployment/external-ip-not-recommended.yml
- type: replace
path: /networks/-
value:
name: foo
type: vip
- type: replace
path: /instance_groups/name=bosh/networks/0/default?
value: [dns, gateway]
- type: replace
path: /instance_groups/name=bosh/networks/-
value:
name: foo
static_ips: [((external_ip))]

View File

@ -0,0 +1,4 @@
---
- type: replace
path: /resource_pools/name=vms/cloud_properties/ip_forwarding?
value: true

View File

@ -0,0 +1,49 @@
resource "google_compute_firewall" "bosh-director-lite" {
name = "${var.env_id}-bosh-director-lite"
network = "${google_compute_network.bbl-network.name}"
source_ranges = ["0.0.0.0/0"]
allow {
ports = ["80", "443", "2222"]
protocol = "tcp"
}
target_tags = ["${var.env_id}-bosh-director"]
}
resource "google_compute_address" "bosh-director-ip" {
name = "${var.env_id}-bosh-director-ip"
}
resource "google_compute_route" "bosh-lite-vms" {
name = "${var.env_id}-bosh-lite-vms"
dest_range = "10.244.0.0/16"
network = "${google_compute_network.bbl-network.name}"
next_hop_ip = "10.0.0.6"
priority = 1
depends_on = ["google_compute_subnetwork.bbl-subnet"]
}
resource "google_compute_firewall" "bosh-director-lite-tcp-routing" {
name = "${var.env_id}-bosh-director-lite-tcp-routing"
network = "${google_compute_network.bbl-network.name}"
source_ranges = ["0.0.0.0/0"]
allow {
ports = ["1024-1123"]
protocol = "tcp"
}
target_tags = ["${var.env_id}-bosh-director"]
}
output "external_ip" {
value = "${google_compute_address.bosh-director-ip.address}"
}
output "jumpbox__external_ip" {
value = "${google_compute_address.jumpbox-ip.address}"
}

View File

@ -0,0 +1,38 @@
az1_gateway: 10.0.16.1
az1_name: us-west1-a
az1_range: 10.0.16.0/24
az1_reserved_1: 10.0.16.2-10.0.16.3
az1_reserved_2: 10.0.16.255
az1_static: 10.0.16.190-10.0.16.254
az2_gateway: 10.0.32.1
az2_name: us-west1-b
az2_range: 10.0.32.0/24
az2_reserved_1: 10.0.32.2-10.0.32.3
az2_reserved_2: 10.0.32.255
az2_static: 10.0.32.190-10.0.32.254
az3_gateway: 10.0.48.1
az3_name: us-west1-c
az3_range: 10.0.48.0/24
az3_reserved_1: 10.0.48.2-10.0.48.3
az3_reserved_2: 10.0.48.255
az3_static: 10.0.48.190-10.0.48.254
director__internal_ip: 10.0.0.6
director__tags:
- lab-1-bosh-director
director_address: https://35.197.32.107:25555
director_name: bosh-lab-1
external_ip: 35.197.49.120
internal_cidr: 10.0.0.0/24
internal_gw: 10.0.0.1
internal_tag_name: lab-1-internal
jumpbox__external_ip: 35.197.32.107
jumpbox__internal_ip: 10.0.0.5
jumpbox__tags:
- lab-1-bosh-open
- lab-1-jumpbox
jumpbox_url: 35.197.32.107:22
network: lab-1-network
subnet_cidr_1: 10.0.16.0/24
subnet_cidr_2: 10.0.32.0/24
subnet_cidr_3: 10.0.48.0/24
subnetwork: lab-1-subnet

@ -0,0 +1 @@
Subproject commit fa4d0f4500241f58cd69b5970c42231bbb36480a

@ -0,0 +1 @@
Subproject commit fe2817cdff018c14b87dc5e50fccc43916add3cf

1
student/lab-1/README.md Normal file
View File

@ -0,0 +1 @@
this is the bosh create-env lab or bosh deploys bosh lab

1
student/lab-2/README.md Normal file
View File

@ -0,0 +1 @@
This is "hello world" bosh deploy lab

1
student/lab-3/README.md Normal file
View File

@ -0,0 +1 @@
This is the deploy bosh-lite lab

1
student/lab-4/README.md Normal file
View File

@ -0,0 +1 @@
this is the deploy cf to bosh-lite lab