Skip to content

Instantly share code, notes, and snippets.

View CalvinHartwell's full-sized avatar
💭
Delivering Kubernetes!

Calvin Hartwell CalvinHartwell

💭
Delivering Kubernetes!
View GitHub Profile
@CalvinHartwell
CalvinHartwell / gist:56a9a6d408533de125bdea920fb1199f
Created April 6, 2019 00:42
ubuntu-16.04.3-lts-preseed.cfg
### Preseed for Ubuntu 16.04.3 LTS
# Derived from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US.UTF8
d-i localechooser/supported-locales multiselect en_US.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select GB
@CalvinHartwell
CalvinHartwell / juju-k8s-caas-charms-demo.MD
Last active April 4, 2019 04:29
juju-k8s-caas-charms-demo.MD

Setup juju for cloud of choice

  sudo snap install kubectl --classic
  sudo snap install juju --classic 
  juju add-credential
  juju bootstrap 

Deploy CDK

@CalvinHartwell
CalvinHartwell / ubuntu-18.04-lts-preseed.cfg
Last active December 10, 2021 19:48
ubuntu-18.04-lts-preseed.cfg
### Preseed for Ubuntu 18.04
# Derived from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Usage
# We recommend to use the build-iso.sh script to build an image with embedded
# preseed and other required files. In that case the preseed file gets loaded
# automatically and all additional files are available to the installer.
### Unattended Installation
d-i auto-install/enable boolean true
@CalvinHartwell
CalvinHartwell / openstack-postconfig.sh
Created March 31, 2019 22:12
openstack-postconfig.sh
openstack flavor create --public --ram 2048 --disk 40 --ephemeral 40 --vcpus 2 m1.medium
wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
openstack image create --file xenial-server-cloudimg-amd64-disk1.img ubuntu-xenial-cloudimg
openstack network create --external --provider-network-type flat --provider-physical-network physnet1 ext_net
# or: openstack network create --external --provider-network-type vlan --provider-segment 1001 --provider-physical-network physnet1 ext_net
openstack subnet create --allocation-pool start=10.5.250.1,end=10.5.250.100 --network ext_net --subnet-range 10.5.0.0/16 --gateway 10.5.0.1 --no-dhcp ext_net_subnet
@CalvinHartwell
CalvinHartwell / juju-cdk-vsphere-deploy.sh
Last active March 29, 2019 03:43
juju-cdk-vsphere-deploy.sh
#!/bin/bash
# By default, juju will place across zones
# But PROD is used for production
# So we make sure everything goes into DEV
ZONE="DEV"
# bundles/cdk-charm-config.yaml can be found below in comments section.
CHARM_CONFIG="bundles/cdk-charm-config.yaml"
DATASTORE="DATASTORE"
PRI_NETWORK="VLAN DEV"
@CalvinHartwell
CalvinHartwell / terraform-stc-bluvalt-openstack-example-vm-provision.yaml
Created March 25, 2019 19:00
terraform-stc-bluvalt-openstack-example-vm-provision
provider "openstack" {
user_name = "calvinh"
tenant_name = "canonical_30039"
tenant_id = "6a74f3b9a17847588d9fdee581cbb01a"
password = <password>
auth_url = "https://api-jed1-vdc.bluvalt.com/identity/v3"
region = "RegionOne"
user_domain_name ="jed1"
project_domain_name = "jed1"
}
ubuntu@juju:~/.local/share/juju$ juju bootstrap bluvalt --debug
22:45:01 INFO juju.cmd supercommand.go:57 running juju [2.5.2 gc go1.10.4]
22:45:01 DEBUG juju.cmd supercommand.go:58 args: []string{"/snap/juju/6849/bin/juju", "bootstrap", "bluvalt", "--debug"}
22:45:01 DEBUG juju.cmd.juju.commands bootstrap.go:908 authenticating with region "" and credential "calvinh" ()
22:45:01 DEBUG juju.cmd.juju.commands bootstrap.go:1036 provider attrs: map[use-openstack-gbp:false policy-target-group: use-floating-ip:false use-default-secgroup:false network: external-network:]
22:45:02 INFO cmd authkeys.go:114 Adding contents of "/home/ubuntu/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
22:45:02 DEBUG juju.cmd.juju.commands bootstrap.go:1092 preparing controller with config: map[logforward-enabled:false apt-ftp-proxy: max-action-results-age:336h use-openstack-gbp:false agent-stream:released container-image-stream:released resource-tags: update-status-hook-interval:5m transmit-vendor-metrics:true juju-no-p
@CalvinHartwell
CalvinHartwell / rpi-juju-localhost-bootstrap
Last active March 13, 2019 22:54
rpi-juju-localhost-bootstrap
ubuntu@microk8s:~/.ssh$ juju bootstrap rpi --debug
22:46:33 INFO juju.cmd supercommand.go:57 running juju [2.5.2 gc go1.10.4]
22:46:33 DEBUG juju.cmd supercommand.go:58 args: []string{"/snap/juju/6851/bin/juju", "bootstrap", "rpi", "--debug"}
22:46:33 INFO cmd cloudcredential.go:83 no credentials found, checking environment
22:46:33 DEBUG juju.cmd.juju.commands bootstrap.go:908 authenticating with region "" and credential "default" ()
22:46:33 DEBUG juju.cmd.juju.commands bootstrap.go:1036 provider attrs: map[]
22:46:45 INFO cmd authkeys.go:114 Adding contents of "/home/ubuntu/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
22:46:45 INFO cmd authkeys.go:114 Adding contents of "/home/ubuntu/.ssh/id_rsa.pub" to authorized-keys
22:46:45 DEBUG juju.cmd.juju.commands bootstrap.go:1092 preparing controller with config: map[agent-metadata-url: https-proxy: snap-https-proxy: fan-config: update-status-hook-interval:5m container-image-stream:released logforward-enabled:false proxy-ssh:false type:manual
@CalvinHartwell
CalvinHartwell / rpi-juju-bootstrap-error
Created March 13, 2019 22:37
rpi-juju-bootstrap-error
calvin@calvinh-ws:~/.local/share/juju$ juju bootstrap raspberry-pi --debug
22:34:35 INFO juju.cmd supercommand.go:57 running juju [2.5.2 gc go1.10.4]
22:34:35 DEBUG juju.cmd supercommand.go:58 args: []string{"/snap/juju/6849/bin/juju", "bootstrap", "raspberry-pi", "--debug"}
22:34:35 INFO cmd cloudcredential.go:83 no credentials found, checking environment
22:34:35 DEBUG juju.cmd.juju.commands bootstrap.go:908 authenticating with region "" and credential "default" ()
22:34:35 DEBUG juju.cmd.juju.commands bootstrap.go:1036 provider attrs: map[]
22:34:36 INFO cmd authkeys.go:114 Adding contents of "/home/calvin/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
22:34:36 INFO cmd authkeys.go:114 Adding contents of "/home/calvin/.ssh/id_rsa.pub" to authorized-keys
22:34:36 DEBUG juju.cmd.juju.commands bootstrap.go:1092 preparing controller with config: map[snap-http-proxy: container-image-metadata-url: agent-stream:released egress-subnets: max-action-results-size:5G disable-network-management:false a