Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3 from keen99/master

basic example set with config tree and sample configs
  • Loading branch information...
commit ca3896974a8db25a46de8d3d7a5df123c4fd174d 2 parents cfaaf31 + 0a9a16d
@joewilliams authored
View
10 README
@@ -6,11 +6,11 @@ Details:
This script accepts a filename (FILE_NAME) as the first arg and a path (HAPROXY_PATH) as the second. It expects the haproxy files/directories to be located as follows:
-HAPROXY_PATH/conf/global.cfg (file)
-HAPROXY_PATH/conf/defaults.cfg (file)
-HAPROXY_PATH/conf/frontend.cfg (file)
-HAPROXY_PATH/conf/frontend.d (dir of frontend configs)
-HAPROXY_PATH/conf/backend.d (dir backend configs)
+HAPROXY_PATH/conf/global.cfg (file - required)
+HAPROXY_PATH/conf/defaults.cfg (file - required)
+HAPROXY_PATH/conf/frontend.cfg (file - required)
+HAPROXY_PATH/conf/frontend.d (dir of frontend configs - optional)
+HAPROXY_PATH/conf/backend.d (dir backend configs - optional)
The script will concatenate these files together to in the appropriate order to create a single large haproxy configuration at HAPROXY_PATH/FILE_NAME. Also note that under the frontend.d and backend.d the script only picks up files with a ".cfg" extension. It wil also attempt to create a backup of the already joined config file.
View
0  bin/haproxy_join 100644 → 100755
File mode changed
View
7 examples/README
@@ -0,0 +1,7 @@
+
+example directory and file tree layout so you can see (and copy for your
+own use) the supported structure
+
+to create the output file (example/haproxy/conf/haproxy.cfg) run:
+sh build.sh
+
View
6 examples/build.sh
@@ -0,0 +1,6 @@
+basedir=$(dirname $0)
+chmod +x $basedir/../bin/haproxy_join
+$basedir/../bin/haproxy_join haproxy.cfg haproxy
+echo "output file is:"
+ls -l haproxy/haproxy.cfg
+
View
1  examples/haproxy/conf/backend.d/2backendd.cfg
@@ -0,0 +1 @@
+#2backendd
View
1  examples/haproxy/conf/backend.d/backendd.cfg
@@ -0,0 +1 @@
+#backendd
View
1  examples/haproxy/conf/defaults.cfg
@@ -0,0 +1 @@
+#defaults
View
1  examples/haproxy/conf/frontend.cfg
@@ -0,0 +1 @@
+#frontend
View
1  examples/haproxy/conf/frontend.d/2frontendd.cfg
@@ -0,0 +1 @@
+#2frontendd
View
1  examples/haproxy/conf/frontend.d/frontendd.cfg
@@ -0,0 +1 @@
+#frontendd
View
1  examples/haproxy/conf/global.cfg
@@ -0,0 +1 @@
+#global
View
0  examples/haproxy/conf/haproxy.cfg
No changes.
View
7 examples/haproxy/haproxy.cfg
@@ -0,0 +1,7 @@
+#global
+#defaults
+#frontend
+#frontendd
+#2frontendd
+#backendd
+#2backendd
Please sign in to comment.
Something went wrong with that request. Please try again.