Skip to content

Instantly share code, notes, and snippets.

View UtahDave's full-sized avatar

David Boucha UtahDave

View GitHub Profile
@UtahDave
UtahDave / gist:5a0b25e82a935e503833
Created September 23, 2015 23:37
RHEL 6 on rackspace
[root@bouchatestrhel6 ~]# yum --disablerepo=* --enablerepo=saltstack-repo install salt
Loaded plugins: product-id, rhnplugin, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package salt.noarch 0:2015.8.0-2.el6 will be installed
--> Processing Dependency: python-msgpack > 0.3 for package: salt-2015.8.0-2.el6.noarch
--> Processing Dependency: python-tornado >= 4.2.1 for package: salt-2015.8.0-2.el6.noarch
--> Processing Dependency: python-futures >= 2.0 for package: salt-2015.8.0-2.el6.noarch
@UtahDave
UtahDave / gist:466634f776d69528ed7a
Created September 23, 2015 23:13
rackspace RHEL7
[root@boucharhel7 ~]# yum --disablerepo=* --enablerepo=saltstack-repo install salt-master
Loaded plugins: langpacks, product-id, rhnplugin, subscription-manager
This system is receiving updates from RHN Classic or Red Hat Satellite.
Resolving Dependencies
--> Running transaction check
---> Package salt-master.noarch 0:2015.8.0-2.el7 will be installed
--> Processing Dependency: salt = 2015.8.0-2.el7 for package: salt-master-2015.8.0-2.el7.noarch
--> Running transaction check
---> Package salt.noarch 0:2015.8.0-2.el7 will be installed
--> Processing Dependency: python-msgpack > 0.3 for package: salt-2015.8.0-2.el7.noarch
@UtahDave
UtahDave / gist:cba1a2307d9914d05fcf
Created September 23, 2015 23:02
RHEL 6 on AWS
[ec2-user@ip-10-254-89-84 ~]$ sudo yum --disablerepo=* --enablerepo=saltstack-repo install salt-master
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package salt-master.noarch 0:2015.8.0-2.el6 will be installed
--> Processing Dependency: salt = 2015.8.0-2.el6 for package: salt-master-2015.8.0-2.el6.noarch
--> Running transaction check
---> Package salt.noarch 0:2015.8.0-2.el6 will be installed
--> Processing Dependency: python-msgpack > 0.3 for package: salt-2015.8.0-2.el6.noarch
@UtahDave
UtahDave / gist:26014e14c7d037552338
Created September 23, 2015 22:22
RHEL 7.1 on AWS install salt-minion and salt-master
[ec2-user@ip-172-30-0-95 ~]$ sudo yum --disablerepo=* --enablerepo=saltstack-repo install salt-minion
Loaded plugins: amazon-id, rhui-lb
Resolving Dependencies
--> Running transaction check
---> Package salt-minion.noarch 0:2015.8.0-2.el7 will be installed
--> Processing Dependency: salt = 2015.8.0-2.el7 for package: salt-minion-2015.8.0-2.el7.noarch
--> Running transaction check
---> Package salt.noarch 0:2015.8.0-2.el7 will be installed
--> Processing Dependency: python-msgpack > 0.3 for package: salt-2015.8.0-2.el7.noarch
--> Processing Dependency: python-tornado >= 4.2.1 for package: salt-2015.8.0-2.el7.noarch
@UtahDave
UtahDave / gist:f26500ee036e80e2f103
Last active September 9, 2015 19:44 — forked from ryan-lane/gist:2c4bed05542b1d088bc4
Environment example
{% if pillar.environment == 'production' %}
Ensure instance1 is configured:
file.managed:
- name /var/local/instance1/context.xml
- source: salt://instance.xml.tmpl
- template: jinja
- context:
somesetting: testme
{% else %}
Ensure instance1 is configured:
@UtahDave
UtahDave / send event
Created September 8, 2015 17:50
Read Salt Master event bus in python
sudo salt-call event.fire_master 'datatuff' 'testtag'
@UtahDave
UtahDave / selfinstaller.bzx
Created August 17, 2015 20:31
RPM self installer using rpm -Uvh
#!/bin/sh
# A self-extracting installer for RPMs
#
# To create: make a gzip-compressed tarball of RPMs (with no subdirectory),
# convert to base64, then concatenate onto the end of this file::
#
# cd /some/directory/of/rpm/files
# tar -cz *.rpm | base64 -w0 >> selfinstaller.bzx
main() {
"""pyvbox: setup appliance description and import_machines.
"""
import virtualbox
vbox = virtualbox.VirtualBox()
# Create new IAppliance and read the exported machine
# called 'ubuntu'.
appliance = vbox.create_appliance()
appliance.read("~/Documents/ubuntu.ova")
#!/bin/sh
# A self-extracting installer for RPMs
#
# To create: make a gzip-compressed tarball of RPMs (with no subdirectory),
# convert to base64, then concatenate onto the end of this file::
#
# cd /some/directory/of/rpm/files
# tar -cz *.rpm | base64 -w0 >> selfinstaller.bzx
main() {
@UtahDave
UtahDave / aws.conf
Created January 5, 2015 19:53
example salt cloud profile specifying a version of Salt to install from git
amazon_amazon:
provider: aws
image: ami-7c807d14
size: t1.micro
ssh_username: ec2-user
script_args: '-- git 2014.7'
amazon_amazon_2014_1_13:
provider: aws