The AWS Auto Scaling Goup, configured with a customised Cloud-Init file, sends a notification to an SNS Topic, which in turn passes it onto an SQS queue that the Salt Master is subscribed to. A Reactor watches for the auto scaling events and pre-approves the new minion based on its Auto Scaling group name and instance ID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {%- set grns = salt.saltutil.runner('cache.grains', tgt='serv*') %} | |
| {%- for id, grn in grns.items()|sort %} | |
| {%- set role = id[3:6] %} | |
| address: {{ grn.ip4_interfaces.eth0[0] | default("127.0.0.1") }} | |
| {%- endfor %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!py | |
| # test.sls | |
| import yaml | |
| def run(): | |
| config = {} | |
| map_file = __salt__.cp.cache_file("salt://formula/map.yaml") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def environments = ["development", "staging", "production"] | |
| stage("deploy to multiple environments") { | |
| def deployments = [:] | |
| environments.each { e -> | |
| deployments[e] = { | |
| stage(e) { | |
| podTemplate(yaml: """\ | |
| apiVersion: v1 | |
| kind: Pod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import yaml | |
| from copy import copy, deepcopy | |
| from yaml.nodes import MappingNode | |
| from yaml.loader import Loader | |
| from yaml.constructor import SafeConstructor | |
| # Copyright Ferry Boender, released under the MIT license. | |
| def deepupdate(tgt, src): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "clients": { | |
| "pyls": { | |
| "command": [ | |
| "~/.environments/pyls/bin/pyls" | |
| ], | |
| "enabled": false, | |
| "settings": { | |
| "pyls": { | |
| "plugins": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %YAML 1.2 | |
| --- | |
| # http://www.sublimetext.com/docs/3/syntax.html | |
| name: effectinfo | |
| file_extensions: | |
| - txt | |
| scope: source.effectinfo | |
| variables: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import hashlib | |
| from zipfile import ZipFile, BadZipFile | |
| from datetime import datetime | |
| from vgio.quake.pak import PakFile, BadPakFile # https://github.com/joshuaskelly/vgio/ <3 | |
| from typing import Union, BinaryIO | |
| def get_digest(b): | |
| """Calculate the SHA256 hash of the bytes""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Game: Quake | |
| // Format: Standard | |
| // entity 0 | |
| { | |
| "classname" "worldspawn" | |
| "_tb_mod" "src;progs_dump" | |
| "_tb_def" "external:/home/james/.darkplaces/hipnotic/maps/src/hipnotic.fgd" | |
| "wad" "/home/james/.darkplaces/id1/maps/src/prototype.wad" | |
| // brush 0 | |
| { |
NewerOlder