Skip to content

Instantly share code, notes, and snippets.

View geekbass's full-sized avatar

Weston Bassler geekbass

  • Emburse
  • Columbus, Ohio
View GitHub Profile
@geekbass
geekbass / main.tf
Created September 21, 2018 13:48
Main.tf - - Creating a Cluster
module "dcos" {
source = "dcos-terraform/dcos/aws"
cluster_name="my-open-dcos-cluster"
ssh_public_key_file="~/.ssh/id_rsa.pub"
num_masters = "1"
num_private_agents = "2"
num_public_agents = "1"
@geekbass
geekbass / main.tf
Created September 21, 2018 13:53
Main.tf - - Scaling a Cluster
module "dcos" {
source = "dcos-terraform/dcos/aws"
cluster_name="my-open-dcos-cluster"
ssh_public_key_file="~/.ssh/id_rsa.pub"
num_masters = "1"
num_private_agents = "3"
num_public_agents = "1"
@geekbass
geekbass / main.tf
Created September 21, 2018 13:55
Main.tf - - Upgrading the Cluster
module "dcos" {
source = "dcos-terraform/dcos/aws"
cluster_name="my-open-dcos-cluster"
ssh_public_key_file="~/.ssh/id_rsa.pub"
num_masters = "1"
num_private_agents = "3"
num_public_agents = "1"
@geekbass
geekbass / install.sh
Last active April 8, 2024 15:20
Installing VSCode on ChromeOS Linux Beta
#!/bin/bash
sudo apt-get update
sudo apt-get install -y gpg
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y code
@geekbass
geekbass / reservations.sh
Created December 27, 2018 18:56
Reserved Resources
curl -skSL \
-H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
-H "Content-Type: application/json" \
"$(dcos config show core.dcos_url)/mesos/slaves" | \
jq -er '[.slaves[] | select(.active==true) | {id: .id, hostname: .hostname, active: .active, reserved_resources_full: (.reserved_resources_full)}]' | \
jq -er '[.[] | select(.reserved_resources_full | length > 0)]' | \
tee reservations.json
@geekbass
geekbass / squash-commits.md
Last active December 28, 2018 19:15
Squash Commits for Feature Branch

Update Branch with Master if been updated since

git pull origin master

Check commit history for $N number of Commits

git reset --soft HEAD~$N
git commit -m "squashing commits"

If preivous push(s) to repo, force push (+)

git push origin +name-of-feature-branch
@geekbass
geekbass / main.tf
Created January 3, 2019 20:05
Main.tf for testing out new Ansible Roles on Ansible Galaxy For DC/OS
# Find Public IP
data "http" "whatismyip" {
url = "http://whatismyip.akamai.com/"
}
# Begin Variables
variable "aws_ami" {
description = "AMI to use"
default = "ami-4bf3d731"
}
@geekbass
geekbass / main.tf
Created March 28, 2019 23:32
Example Infra Module
# Find Public IP
data "http" "whatismyip" {
url = "http://whatismyip.akamai.com/"
}
# Begin Variables
variable "aws_ami" {
description = "AMI to use"
default = "ami-4bf3d731"
}
@geekbass
geekbass / Terraformfile
Created April 3, 2019 15:48
v2 Installer
{
"dcos-terraform/dcos/aws": {
"source": "git::https://github.com/dcos-terraform/terraform-aws-dcos.git?ref=release/v0.2"
},
"dcos-terraform/infrastructure/aws": {
"source": "git::https://github.com/dcos-terraform/terraform-aws-infrastructure.git?ref=release/v0.2"
},
"dcos-terraform/vpc/aws": {
"source": "git::https://github.com/dcos-terraform/terraform-aws-vpc.git?ref=release/v0.2"
},