You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
-
#c4-bootstrap
1
+
#c4-bootstrap
2
2
3
3
A quick and simple configuration tool to build servers (cloud or real) to a consitant install level, provided by channel4.com
4
4
5
-
##Concept
5
+
##Concept
6
6
7
7
c4-bootstrap is split into to major scripts and two directory structures.
8
8
9
-
##Requirements
9
+
##Requirements
10
10
11
-
##Commands
11
+
##Commands
12
12
13
-
###bootstrap.sh
13
+
###bootstrap.sh
14
14
bootstrap.sh allows you to quickly setup your system to specified environment, it will run pre.d and post.d scripts and also copy your directory structure from files to the root of the system. The follow explains how the script works.
15
15
16
-
####Environment checks
16
+
####Environment checks
17
17
On running the bootstrap.sh scrip the system checks for the system distro name and the version. The version number can be tweaked at the top of the file by altering the followinf variable:
18
18
19
19
supported_dist="Ubuntu"
@@ -23,21 +23,21 @@ To set the script to not copy files to the root directory change the following v
23
23
24
24
prod=1
25
25
26
-
####pre.d scripts
26
+
####pre.d scripts
27
27
The script will then itterate through scripts/pre.d/XXXX and run each script in order. These are simply bash scripts to perform initial tasks such as install dependancies. An example script is provided. Scripts are run in order so 00-.... will be run before 01-....
28
28
29
-
####exploding files
29
+
####exploding files
30
30
This part of the script takes the contents of files/.... and copies them to / This allows you to include files such as a custom motd or something more useful like a sites-enabled config for nginx or apache. To set the script to not copy files to the root directory change the following value to 0 in this case the files will be copied to /tmp/c4-bootstrap.
31
31
32
32
prod=0
33
33
34
-
####post.d
34
+
####post.d
35
35
The final part of the script is post.d. This is called in the same way as pre.d and itterates through scripts/post.d/XXXX. In post.d you should run things that can only be done once the software is installed and the files are in place. An example of this would be _*a2ensite mysite.conf*_. Yet again these are bash scripts and will be run in numerical order.
36
36
37
-
###repack.sh
37
+
###repack.sh
38
38
whilst repack.sh allows you to commit local system changes back to a git repo in order repeat these changes on other servers.
39
39
40
-
###Files
40
+
###Files
41
41
42
42
The file structure of the system is kept within files, this should be treated as a mirror of your root / for example files/etc/nginx/nginx.conf after bootstrap.sh is run will map to /etc/nginx/nginx.conf
0 commit comments