Skip to content

Instantly share code, notes, and snippets.

View carlosonunez's full-sized avatar

Carlos Nunez carlosonunez

View GitHub Profile
@carlosonunez
carlosonunez / speaking_and_sponsorship_for_hashicorp_dfw.markdown
Last active May 17, 2017 01:00
HashiCorp DFW Speaking and Sponsoring Guidelines

Hey! Thanks for your interest in speaking at HashiCorp DFW. We're glad you're here!

This is a short document about what we're expecting from our speakers. If you have any feedback about this, feel free to leave a comment here or email me at dev@carlosnunez.me.

Speaking Guidelines

We're looking for talks that focus on using HashiCorp's tools in a given environment, namely:

  • Terraform
Viewing all configuration parameters for Puppet
------------------------------------------------
$> sudo puppet config print all
Viewing all classes registered to a node
-----------------------------------------
$> cat $(puppet config print vardir)/cache/classes.txt
Doing a Puppet run of a specific module
---------------------------------------
# Env vars
PUPPET_MASTER="YOUR_PUPPET_MASTER_HERE"
GIT_REPOSITORY=https://github.com/carlosonunez/infrastructure_management
PUPPET_CONFIG_BRANCH="puppet_data_config"
# Add the Puppet Labs repository
cd ~ && wget https://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
sudo dpkg -i puppetlabs-release-pc1-trusty.deb
# Install puppet-agent
References
===========
1. Why puppetmaster-passenger
a. http://stackoverflow.com/questions/36625280/what-is-the-difference-between-puppetserver-1-1-3-vs-puppet-server-3-8-6-1
b. The long way: https://ubuntuforums.org/showthread.php?t=2085991
2. Differences between puppet-master and Passenger/puppet-master: https://docs.puppet.com/puppetserver/latest/puppetserver_vs_passenger.html
3. Upstart vs SysVinit (yes, it's that old):
a. http://askubuntu.com/questions/2075/whats-the-difference-between-service-and-etc-init-d
b. http://askubuntu.com/questions/5039/what-is-the-difference-between-etc-init-and-etc-init-d
4. puppet.conf documentation: https://docs.puppet.com/puppet/latest/configuration.html
1. Adding a `file` provisioner to a resource doesn't trigger a rebuild. The only issue I found related to this is here: https://github.com/hashicorp/terraform/issues/6065
2. For the `connection` block, it's `private_key`, not `key_name`. Terraform didn't fight me on this...
3. `private_key` only takes the `file()` method and the path has to be absolute. Nothing else works...
1. Create an etcd token; store it in Vault or some other secure location
2. Create file /etc/systemd/system/docker.service.d/custom.conf with contents:
[Service]
Environment="DOCKER_OPTS=-H=0.0.0.0:2376 -H unix:///var/run/docker.sock --cluster-advertise eth1:2376 --cluster-store etcd://127.0.0.1:2379"
This needs to be done in cloud-init since CoreOS is super bare-bones and "doesn't" contain support for config mgmt out of the box.
(incomplete)
This question comes up often here. As a Windows systems engineer that transitioned into a "DevOps" systems engineer (this is a very contentious title, but "systems engineer that IS DevOps" doesn't have the same ring to it) over about a year, I'd like to start a living FAQ/guide on how to get into this game.
I'm also posting it on Gist [here](https://gist.github.com/carlosonunez/83312c12f884444620a495ef60882945). I presume that I'll update that one more frequently.
# Materials Required
* A healthy love for learning (DevOps is very young and is evolving almost daily)
* Patience with being the "dumb guy in the room"
#!/bin/bash
# NOTE: This assumes a few things:
# * that you are running Ubuntu 14.10,
# * that you are using EC2 for master and slaves,
# * that you are using Github for source control, and
# * that you want to use Google Apps for logging in.
# 1. Set up S3FS
# ===============
1. sudo apt-get install software-properties-common
2. sudo add-apt-repository ppa:gluster/glusterfs-3.5
3. sudo apt-get update
4. sudo apt-get install glusterfs-server
5. Create an EBS volume and mount it to each server
6. Probe for other glusterfs servers in the subnet that aren't itself using `gluster peer probe <ip>`
7. Create a new volume in the pool (from the example): ` gluster volume create testvol rep 2 transport tcp node01:/export/sdb1/brick node02:/export/sdb1/brick`
1. Are you having trouble getting instances to connect to each other despite their inbound security grounds being configured properly?
a. Have you tried disabling `iptables` or the Windows firewall?
b. If they are in a VPC, are their egress rules configured correctly?