Skip to content

Instantly share code, notes, and snippets.

View codyde's full-sized avatar
👊
Smash Them Toggles and Coding Cool Things

Cody De Arkland codyde

👊
Smash Them Toggles and Coding Cool Things
View GitHub Profile
@codyde
codyde / docker-compose.yaml
Created April 18, 2019 06:09
3-Tier-DemoApp
# use this with `docker-compose up` against a generic Docker end-point (e.g. standalone Docker)
version: "3.7"
services:
frontend:
build:
context: ./frontend-tier
dockerfile: ./Dockerfile
image: harbor.humblelab.com/library/cmbu-app-frontend:latest
@codyde
codyde / sample.yaml
Created December 7, 2018 21:59
Focused on Storage Constraint
inputs: {}
resources:
Cloud_Machine_1:
type: Cloud.Machine
properties:
constraints:
- tag: 'cloud:vsphere'
image: Ubuntu
flavor: small
networks:
@codyde
codyde / sample.yaml
Created December 7, 2018 21:59
Focused on Storage Constraint
inputs: {}
resources:
Cloud_Machine_1:
type: Cloud.Machine
properties:
constraints:
- tag: 'cloud:vsphere'
image: Ubuntu
flavor: small
networks:
inputs:
username:
type: string
title: Username
resources:
web1:
type: Cloud.Machine
networks:
- name: '${Cloud_Network_1.name}'
properties:
inputs:
username:
type: string
title: Username
resources:
web1:
type: Cloud.Machine
networks:
- name: '${Cloud_Network_1.name}'
properties:
@codyde
codyde / dns.ps1
Last active October 12, 2018 09:27
DNS Update Script
[CmdletBinding()]
Param(
[Parameter(Mandatory = $True)]
[String]$Hostname,
[Parameter(Mandatory = $True)]
[String]$Domain,
[Parameter(Mandatory = $True)]
[String]$IP
inputs: {}
resources:
Cloud_Machine_1:
type: Cloud.Machine
properties:
image: Ubuntu
flavor: Small
networks:
- name: '${Cloud_Network_1.name}'
Cloud_Network_1:
@codyde
codyde / vmc-example.py
Created March 16, 2018 06:34
Example of VMC API Calls
import requests
import os
def login():
key = os.environ['oauthkey']
baseurl = 'https://console.cloud.vmware.com/csp/gateway'
uri = '/am/api/auth/api-tokens/authorize'
headers = {'Content-Type':'application/json'}
payload = {'refresh_token': key}
r = requests.post(f'{baseurl}{uri}', headers = headers, params = payload)
Wifi SSID: 500CM-CONF
Password: botwtmpr
vCenter Server Name: vcsa01.corp.local
vCenter IP: 52.36.60.129
Username: Student[01-60]
Password: Password[01-60]
Lab 1:
@codyde
codyde / network-selection.js
Created February 13, 2018 04:15
XaaS - Network Selection
if (Network == "Common"){
catRequestJSON.Ubuntu1604.data["VirtualMachine.Network0.Name"] = "Common-VLAN"
} else if (Network == "Web"){
catRequestJSON.Ubuntu1604.data["VirtualMachine.Network0.Name"] = "Web-VLAN"
} else if (Network == "DB"){
catRequestJSON.Ubuntu1604.data["VirtualMachine.Network0.Name"] = "DB-VLAN"
}