Skip to content

Instantly share code, notes, and snippets.

View arubis's full-sized avatar

Dylan Fitzgerald arubis

View GitHub Profile
[INFO ] Executing command ['apt-cache', '-q', 'policy', 'elasticsearch'] in directory '/home/dylan'
[DEBUG ] stdout: elasticsearch:
Installed: (none)
Candidate: 1.1.1
Version table:
1.1.1 0
500 http://packages.elasticsearch.org/elasticsearch/1.1/debian/ stable/main amd64 Packages
1.1.0 0
500 http://packages.elasticsearch.org/elasticsearch/1.1/debian/ stable/main amd64 Packages
1.0.3 0
dylan@salt /srv/salt (internal-ip-nginx-endpoint●)$ _ salt-cloud -m /etc/salt/logstash-stage-only -d
[INFO ] salt-cloud starting
[INFO ] Applying map from '/etc/salt/logstash-stage-only'.
[ERROR ] An un-handled exception was caught by salt's global exception handler:
KeyError: 'logstash_ops'
Traceback (most recent call last):
File "/usr/bin/salt-cloud", line 10, in <module>
salt_cloud()
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 121, in salt_cloud
@arubis
arubis / _etc_salt_cloud.profiles
Last active November 13, 2023 20:22
Salt doesn't see individual values in 'roles' grain
base_ec2_private:
provider: my-ec2-us-east-private-ips
image: ami-018c9568
size: Micro Instance
ssh_username: ubuntu
base_ec2_public:
provider: my-ec2-us-east-public-ips
image: ami-018c9568
size: Micro Instance
dylan@salt /srv/salt (internal-ip-nginx-endpoint●)$ _ salt '*' grains.item roles
logstash_staging:
roles: {'logstash-reciever': True, 'elasticsearch': True, 'logstash': True, 'kibana': True}
logstash_ops:
roles:
logstash-reciever
logstash
elasticsearch
kibana
dylan@salt /srv/salt (internal-ip-nginx-endpoint●)$ _ salt -G 'roles:elasticsearch' test.ping
dylan@salt /srv/salt (internal-ip-nginx-endpoint●)$ _ salt '*' grains.item roles
logstash_staging:
roles:
logstash-reciever
logstash
elasticsearch
kibana
logstash_ops:
roles:
logstash-reciever
@arubis
arubis / salt.sls
Created August 27, 2014 14:29
salt.sls
salt-minion:
pkgrepo.managed:
- ppa: saltstack/salt
pkg.latest:
- name: salt-minion
- refresh: True
@arubis
arubis / gist:c7f97ba7255ce8fd0b44
Created October 30, 2014 21:57
elasticsearch-docker.sls
dockerfile/elasticsearch:
docker.pulled:
- name: dockerfile/elasticsearch
- require_in: elasticsearch-container
elasticsearch-container:
docker.installed:
- name: elasticsearch
- hostname: elasticsearch
- image: dockerfile/elasticsearch
@arubis
arubis / broken_by_extends_keyword__cloud.providers.d--ec2.conf
Created November 5, 2014 19:31
salt-cloud hangs when cloud.providers contains an 'extends' keyword
# causes salt-cloud to hang
my-aws-ubuntu:
- id: XXXXXXXX
ssh_interface: private_ips
grains:
node_type: managed
key: 'XXXXXXXX'
private_key: /etc/salt/salt-master.pem
keyname: salt-master
@arubis
arubis / gist:d7e4fd88155bf7161bd7
Created November 24, 2014 20:56
salt-cloud fails to attach newly-created volume
Connection to (successfully created instance, IP removed) closed.
[INFO ] Salt installed on ops_elk_slave-00
[INFO ] Created Cloud VM 'ops_elk_slave-00'
[INFO ] Create and attach volumes to node ops_elk_slave-00
[INFO ] Starting new HTTPS connection (1): ec2.us-east-1.amazonaws.com
[INFO ] Starting new HTTPS connection (1): ec2.us-east-1.amazonaws.com
[ERROR ] EC2 Response Status Code and Error: [400 400 Client Error: Bad Request] {'Errors': {'Error': {'Message': "vol-6eed552a is not 'available'.", 'Code': 'IncorrectState'}}, 'RequestID': '2261f3a9-6672-4b60-8c94-b8380c882730'}
[INFO ] Starting new HTTPS connection (1): ec2.us-east-1.amazonaws.com
[INFO ] Starting new HTTPS connection (1): ec2.us-east-1.amazonaws.com
[ERROR ] EC2 Response Status Code and Error: [400 400 Client Error: Bad Request] {'Errors': {'Error': {'Message': 'No attributes specified.', 'Code': 'InvalidParameterCombination'}}, 'RequestID': '6d544e7b-02da-42bd-8d92-4533f8f5ba78'}
@arubis
arubis / new.sls
Created January 16, 2015 17:25
ksk-motd
motd:
pkg.installed:
- name: update-motd
/etc/update-motd.d/00-dynmotd:
file.managed:
- source: salt://configs/update-motd.d/00-dynmotd
/etc/update-motd.d/20-list-updates:
file.managed: