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
+68-30Lines changed: 68 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,61 +6,99 @@ To enable/disable modules, update and change the HTTPD installation then there i
6
6
7
7
The webservers default port is also 8080 to let it traverse the MCP NACL.
8
8
9
-
When deployed this terraform code creates an ECS cluster, with an EFS backend that then allows us to store apache configs
10
-
in a filesystem that wont vanish when it restarts. As such the EFS filesystem also needs a way to create new files, this is
11
-
done via a lambda function that writes valid apache config files to the EFS mount.
9
+
When deployed this terraform code creates an ECS cluster, with a baseline set of SSM parameters that other services can then extend with their own Apache HTTPD configurations. The configurations are pulled down and collated by the container on restart, so reloading of the configuration after changes is handled by triggering a lambda function.
The config files are written as flat configs. They are then used inside a main apache2 config like this:
35
37
38
+
39
+
The configuration is collated from SSM parameters residing under `/unity/${var.project}/${var.venue}/cs/management/proxy/configurations/`, and assembled like so:
One can execute the httpdmanager lambda function directly with the following json syntax:
75
+
```
53
76
77
+
This repository configures only one virtualhost (both open and close directives), but others may be added. This can be accomplished by simply adding more SSM parameters:
name = "/unity/${var.project}/${var.venue}/cs/management/proxy/configurations/100-closevhost8080"
90
+
type = "String"
91
+
value = <<-EOT
92
+
</VirtualHost>
93
+
EOT
94
+
}
60
95
```
96
+
NOTE the names of each of these SSM parameters:
97
+
- 001-openvhost8080
98
+
- 010-management
99
+
- 100-closevhost8080
61
100
62
-
The template must be json encoded. I've used https://nddapp.com/json-encoder.html successfully.
63
-
101
+
For additional virtualhosts, please pick an ordinal number range that is *greater* than 100 (e.g. 101-openTestHost, 120-closeTestHost).
64
102
65
103
## How do I know what to add in the 'template' file above?
66
104
We are not perfect human beings. In order to iterate quickly on the above templat contents, we have created a development proxy environment that can be tested mostly locally. Check out the `develop` directory for instructions.
0 commit comments