Skip to content

Commit 488922b

Browse files
committed
Initial Commit : original code archive from 2013
1 parent 0f246ef commit 488922b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1924
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.project
2+
/pki

MASTER/CLEAN.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/env bash
2+
3+
## this will clear out various areas from the master to make it new and squeaky
4+
echo "PRESS ANY KEY TO CLEAR KEYS AND CACHES"
5+
read GO
6+
rm -rf /etc/salt/pki
7+
rm -rf /var/cache/salt/master
8+
rm -rf /var/cache/salt/minion
9+
echo "DONE.."

MASTER/INSTALL.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
# here you are, now that you've cloned the repo
4+
# cd $THIS_DIRECTORY (really important..)
5+
6+
# to setup a MASTER
7+
## install package repos and update everything
8+
./ROOT/root/bin/init-instance.sh
9+
## install saltmaster + minion with stub configurations
10+
./ROOT/root/bin/bootstrap-git-develop.sh
11+
## copy in our configs from this repo, overwrite what packages installed
12+
./link-configs.sh
13+
## now we can actually configure things..
14+
./ROOT/root/bin/configure-git-develop.sh
15+
16+
grep $(dirname $PWD)/MASTER/ROOT/root/bin $HOME/.bash_profile || echo "PATH=\$PATH:$PWD/ROOT/root/bin ; export PATH" >> $HOME/.bash_profile
17+
18+
19+
echo "HIT ENTER TO REBOOT"
20+
read GO
21+
22+
## lets reboot to enable new kernel..
23+
init 6;exit

MASTER/README.txt

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
## http://docs.saltstack.com/ref/configuration/master.html
2+
3+
## these files go on the master..
4+
## -- required to bootstrap a master config before any states can be applied
5+
6+
## this sets up a 'continuous integration' environment
7+
## similar to this : http://thiglife.com/2013/08/07/managing-a-saltstack-salt-master-with-git/
8+
9+
INSTRUCTIONS:
10+
11+
1) this is tailored for develpment & testing and..
12+
-- works only on CENTOS
13+
this installer creates links where system directories should be.. a great way to use this is share the folder in virtual box, open the filesystem in your favorite editor on the host, and be able to test changes in realtime since the system is using configs which are actually on the host system
14+
this works just as well with a local or remote git repo
15+
16+
17+
cd (here)
18+
sudo -i (etc, become root)
19+
./INSTALL.sh
20+
21+
the installer will reboot your VM and then...
22+
23+
2) when you login again, things will be in the custom python environment. in this case, because its installed as "root", thats the account that will get the custom bash environment to initialize the custom python environment..
24+
25+
salt will be installed but not running.
26+
it will be reading config files from *this repo*
27+
28+
open up a few windows and startup master and/or minion processes as needed
29+
30+
# to put in the background as a daemon, logging normally (as configured)
31+
> salt-master -d
32+
> salt-minion -d
33+
34+
# to run in the foreground in debug mode
35+
> salt-master -l debug
36+
> salt-minion -l debug
37+
38+
#make sure to accept the master as a minion of itself!
39+
40+
> salt-key -A
41+
42+
you'll see files created in /etc/salt/pki and /var/cache/salt
43+
44+
3) use salt on the commandline or via web interface running at https://$HOSTNAME:8080
45+
the web interface will authenticate any local user, but this package installs a custom user
46+
47+
login with these credentials:
48+
49+
user: saltrunner
50+
pass: halite
51+
52+
## NOTE:
53+
this repo depends on numerous resources on the network.. sometimes github is slow to respond. if the installer hangs up, just hit control-C and start it again.
54+
not much support is built in for 'upgrading' everything automatically, so you'll need to do that selectively for each component
55+
everything gets installed at /usr/local/src
56+
57+
..
58+
.
59+
:wq!
60+
:)

MASTER/ROOT/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## these files go on the master..

MASTER/ROOT/etc/salt/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/pki
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
$INSTANCE_PROFILE_NAME:
2+
provider: $PROVIDER_NAME
3+
size: $FLAVOR_NAME
4+
image: $IMAGE_NAME
5+
ssh_password: $IMAGE_ROOT_PASSWORD
6+
## this will need to be modified to match whatever specific images and flavor(size definitions) are present
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
$PROVIDER_NAME:
2+
# Set the location of the salt-master
3+
#
4+
minion:
5+
master: $SALTMASTER_IP_OR_FQDN
6+
7+
identity_url: '$OS_AUTH_URL'
8+
protocol: ipv4
9+
10+
compute_region: $NOVA_REGION_NAME
11+
compute_name : nova
12+
service_type : compute
13+
14+
user: '$NOVA_USERNAME'
15+
password: '$NOVA_PASSWD'
16+
17+
tenant: '$NOVA_PROJECT_ID'
18+
19+
provider: openstack
20+
21+
ssh_key_name: $KEYPAIR_NAME
22+
## the keypair name which has already been uploaded into the account/project
23+
ssh_key_file: $KEYCHAIN_DIR/$KEYPAIR_NAME-$PRIVATE_KEY
24+
## eg, you'll need the private key local to the saltmaster since it needs this to login
25+

MASTER/ROOT/etc/salt/master

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
##### Primary configuration settings #####
2+
##########################################
3+
# This configuration file is used to manage the behavior of the Salt Master
4+
# Values that are commented out but have no space after the comment are
5+
# defaults that need not be set in the config. If there is a space after the
6+
# comment that the value is presented as an example and is not the default.
7+
8+
# Per default, the master will automatically include all config files
9+
# from master.d/*.conf (master.d is a directory in the same directory
10+
# as the main master config file)
11+
#default_include: master.d/*.conf
12+
13+
# The address of the interface to bind to
14+
# interface: 192.168.0.10
15+
16+
# Whether the master should listen for IPv6 connections. If this is set to True,
17+
# the interface option must be adjusted too (for example: "interface: '::'")
18+
ipv6: False
19+
20+
# The tcp port used by the publisher
21+
#publish_port: 4505
22+
23+
# The user to run the salt-master as. Salt will update all permissions to
24+
# allow the specified user to run the master. If the modified files cause
25+
# conflicts set verify_env to False.
26+
#user: root
27+
28+
# Max open files
29+
# Each minion connecting to the master uses AT LEAST one file descriptor, the
30+
# master subscription connection. If enough minions connect you might start
31+
# seeing on the console(and then salt-master crashes):
32+
# Too many open files (tcp_listener.cpp:335)
33+
# Aborted (core dumped)
34+
#
35+
# By default this value will be the one of `ulimit -Hn`, ie, the hard limit for
36+
# max open files.
37+
#
38+
# If you wish to set a different value than the default one, uncomment and
39+
# configure this setting. Remember that this value CANNOT be higher than the
40+
# hard limit. Raising the hard limit depends on your OS and/or distribution,
41+
# a good way to find the limit is to search the internet for(for example):
42+
# raise max open files hard limit debian
43+
#
44+
#max_open_files: 100000
45+
46+
# The number of worker threads to start, these threads are used to manage
47+
# return calls made from minions to the master, if the master seems to be
48+
# running slowly, increase the number of threads
49+
#worker_threads: 5
50+
51+
# The port used by the communication interface. The ret (return) port is the
52+
# interface used for the file server, authentication, job returnes, etc.
53+
#ret_port: 4506
54+
55+
# Specify the location of the daemon process ID file
56+
#pidfile: /var/run/salt-master.pid
57+
58+
# The root directory prepended to these options: pki_dir, cachedir,
59+
# sock_dir, log_file, autosign_file, extension_modules, key_logfile, pidfile.
60+
#root_dir: /
61+
62+
# Directory used to store public key data
63+
#pki_dir: /etc/salt/pki/master
64+
65+
# Directory to store job and cache data
66+
#cachedir: /var/cache/salt/master
67+
68+
# Verify and set permissions on configuration directories at startup
69+
#verify_env: True
70+
71+
# Set the number of hours to keep old job information in the job cache
72+
#keep_jobs: 24
73+
74+
# Set the default timeout for the salt command and api, the default is 5
75+
# seconds
76+
#timeout: 5
77+
78+
# The loop_interval option controls the seconds for the master's maintinance
79+
# process check cycle. This process updates file server backends, cleans the
80+
# job cache and executes the scheduler.
81+
#loop_interval: 60
82+
83+
# Set the default outputter used by the salt command. The default is "nested"
84+
#output: nested
85+
86+
# By default output is colored, to disable colored output set the color value
87+
# to False
88+
#color: True
89+
90+
# Set the directory used to hold unix sockets
91+
#sock_dir: /var/run/salt/master
92+
93+
# The master maintains a job cache, while this is a great addition it can be
94+
# a burden on the master for larger deployments (over 5000 minions).
95+
# Disabling the job cache will make previously executed jobs unavailable to
96+
# the jobs system and is not generally recommended.
97+
#
98+
#job_cache: True
99+
100+
# Cache minion grains and pillar data in the cachedir.
101+
#minion_data_cache: True
102+
103+
## << break this into separate included config
104+
## << use this for creating a tree of projects, each with syndic/pillar/node, etc
105+
# The master can include configuration from other files. To enable this,
106+
# pass a list of paths to this option. The paths can be either relative or
107+
# absolute; if relative, they are considered to be relative to the directory
108+
# the main master configuration file lives in (this file). Paths can make use
109+
# of shell-style globbing. If no files are matched by a path passed to this
110+
# option then the master will log a warning message.
111+
#
112+
#
113+
# Include a config file from some other path:
114+
# include: /etc/salt/extra_config
115+
#
116+
# Include config from several files and directories:
117+
# include:
118+
# - /etc/salt/extra_config
119+
120+
121+
##### Security settings #####
122+
##########################################
123+
# Enable "open mode", this mode still maintains encryption, but turns off
124+
# authentication, this is only intended for highly secure environments or for
125+
# the situation where your keys end up in a bad state. If you run in open mode
126+
# you do so at your own risk!
127+
#open_mode: False
128+
129+
# Enable auto_accept, this setting will automatically accept all incoming
130+
# public keys from the minions. Note that this is insecure.
131+
#auto_accept: False
132+
133+
# If the autosign_file is specified only incoming keys specified in
134+
# the autosign_file will be automatically accepted. This is insecure.
135+
# Regular expressions as well as globing lines are supported.
136+
#autosign_file: /etc/salt/autosign.conf
137+
138+
# Enable permissive access to the salt keys. This allows you to run the
139+
# master or minion as root, but have a non-root group be given access to
140+
# your pki_dir. To make the access explicit, root must belong to the group
141+
# you've given access to. This is potentially quite insecure.
142+
# If an autosign_file is specified, enabling permissive_pki_access will allow group access
143+
# to that specific file.
144+
#permissive_pki_access: False
145+
146+
# Allow users on the master access to execute specific commands on minions.
147+
# This setting should be treated with care since it opens up execution
148+
# capabilities to non root users. By default this capability is completely
149+
# disabled.
150+
#
151+
# client_acl:
152+
# larry:
153+
# - test.ping
154+
# - network.*
155+
#
156+
157+
# Blacklist any of the following users or modules
158+
#
159+
# This example would blacklist all non sudo users, including root from
160+
# running any commands. It would also blacklist any use of the "cmd"
161+
# module.
162+
# This is completely disabled by default.
163+
#
164+
# client_acl_blacklist:
165+
# users:
166+
# - root
167+
# - '^(?!sudo_).*$' # all non sudo users
168+
# modules:
169+
# - cmd
170+
171+
# The external auth system uses the Salt auth modules to authenticate and
172+
# validate users to access areas of the Salt system.
173+
#
174+
# external_auth:
175+
# pam:
176+
# fred:
177+
# - test.*
178+
#
179+
180+
# Time (in seconds) for a newly generated token to live. Default: 12 hours
181+
# token_expire: 43200
182+
183+
184+
##### Master Module Management #####
185+
##########################################
186+
# Manage how master side modules are loaded
187+
188+
# Add any additional locations to look for master runners
189+
#runner_dirs: []
190+
191+
# Enable Cython for master side modules
192+
#cython_enable: False
193+
194+
### all other configs are in ./master.d/*.conf
195+
###

0 commit comments

Comments
 (0)