Skip to content

Instantly share code, notes, and snippets.

View Adron's full-sized avatar
🤘
GSD. Just ping me, I'll get back at ya.

Adron Hall Adron

🤘
GSD. Just ping me, I'll get back at ya.
View GitHub Profile
@Adron
Adron / pass-parameter.sh
Created April 16, 2016 23:43
Pass Parameters to Bash Script
name=$1
if [[ -n "$name" ]]; then
echo "Got $name Parameter."
else
echo "argument error"
fi
@Adron
Adron / build.sh
Created August 17, 2019 01:21
A Build Script for Packer on Azure
GROUPNAME="adrons-images"
LOCATION="westus2"
STORAGENAME="adronsimagestorage"
IMAGECASSANDRA="basecassandra"
echo 'Deleting existing image.'
az image delete -g $GROUPNAME -n $IMAGECASSANDRA
echo 'Creating the managed resource group for images.'
@Adron
Adron / node-cassandra.json
Created August 17, 2019 01:20
Apache Cassandra 3.11.4 on Ubuntu 18.04 LTS Packer Template
{
"variables": {
"client_id": "{{env `TF_VAR_clientid`}}",
"client_secret": "{{env `TF_VAR_clientsecret`}}",
"tenant_id": "{{env `TF_VAR_tenant_id`}}",
"subscription_id": "{{env `TF_VAR_subscription_id`}}",
"imagename": "",
"storage_account": "adronsimagestorage",
"resource_group_name": "adrons-images"
},
@Adron
Adron / packer_ubuntu.json
Created August 16, 2019 01:31
Building a Basic Ubuntu Image w/ Packer using Device Login
{
"variables": {
"tenant_id": "{{env `TF_VAR_tenant_id`}}",
"subscription_id": "{{env `TF_VAR_subscription_id`}}",
"storage_account": "adronsimagestorage",
"resource_group_name": "adrons-images"
},
"builders": [{
"type": "azure-arm",
@Adron
Adron / clusternode.json
Created August 8, 2019 23:32
Clusternode.json file for Packer Build.
{
"variables": {
"client_id": "{{env `TF_VAR_clientid`}}",
"client_secret": "{{env `TF_VAR_clientsecret`}}",
"tenant_id": "{{env `TF_VAR_tenant_id`}}",
"subscription_id": "{{env `TF_VAR_subscription_id`}}",
"storage_account": "adronsimagestorage",
"resource_group_name": "adrons-images"
},
@Adron
Adron / crash.log
Created August 8, 2019 23:29
The Error I've been getting from Packer image building on Azure.
2019/08/08 16:07:29 [INFO] Packer version: 1.4.2
2019/08/08 16:07:29 Packer Target OS/Arch: linux amd64
2019/08/08 16:07:29 Built with Go Version: go1.12.6
2019/08/08 16:07:29 Detected home directory from env var: /home/adron
2019/08/08 16:07:29 Using internal plugin for proxmox
2019/08/08 16:07:29 Using internal plugin for amazon-ebs
2019/08/08 16:07:29 Using internal plugin for amazon-ebsvolume
2019/08/08 16:07:29 Using internal plugin for hyperv-iso
2019/08/08 16:07:29 Using internal plugin for linode
2019/08/08 16:07:29 Using internal plugin for ncloud
@Adron
Adron / node.json
Last active August 7, 2019 00:40
The Basic Packer Example from Microsoft's Docs.
{
"variables": {
"client_id": "{{env `TF_VAR_clientid`}}",
"client_secret": "{{env `TF_VAR_clientsecret`}}",
"tenant_id": "{{env `TF_VAR_tenant_id`}}",
"subscription_id": "{{env `TF_VAR_subscription_id`}}"
},
"builders": [{
"type": "azure-arm",
@Adron
Adron / .bash_profile.sh
Created August 1, 2019 20:05
The export of the subscription and tenant ID's for Azure use with Terraform.
export TF_VAR_subscription_id="00000000-0000-0000-0000-000000000000"
export TF_VAR_tenant_id="11111111-1111-1111-1111-111111111111"
@Adron
Adron / main.tf
Created August 1, 2019 20:01
Setting up an Azure Resource Group.
provider "azurerm" {
version = "=1.27.0"
subscription_id = "00000000-0000-0000-0000-000000000000"
tenant_id = "11111111-1111-1111-1111-111111111111"
}
resource "azurerm_resource_group" "adrons_resource_group_workspace" {
name = "adrons_workspace"
@Adron
Adron / install.sh
Created August 1, 2019 17:29
Installing Azure CLI on Debian/Ubuntu Linux
# Update the latest packages and make sure certs, curl, https transport, and related packages are updated.
sudo apt-get update
sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg
# Download and install the Microsoft signing key.
curl -sL https://packages.microsoft.com/keys/microsoft.asc | \
gpg --dearmor | \
sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null
# Add the software repository of the Azure CLI.