11# ns8-mautic
22
3-
43## Install
54
65Instantiate the module with:
76
87``` shell
98 add-module ghcr.io/geniusdynamics/mautic:latest 1
109```
11-
1210
1311The output of the command will return the instance name.
1412Output example:
@@ -20,11 +18,11 @@ Output example:
2018Let's assume that the mattermost instance is named ` mautic1 ` .
2119
2220Launch ` configure-module ` , by setting the following parameters:
21+
2322- ` host ` : a fully qualified domain name for the application
2423- ` http2https ` : enable or disable HTTP to HTTPS redirection (true/false)
2524- ` lets_encrypt ` : enable or disable Let's Encrypt certificate (true/false)
2625
27-
2826Example:
2927
3028```
3836```
3937
4038The above command will:
39+
4140- start and configure the mautic instance
4241- configure a virtual host for trafik to access the instance
4342
4443## Get the configuration
44+
4545You can retrieve the configuration with
4646
4747```
4848api-cli run get-configuration --agent module/mautic1
4949```
5050
51+ ``` shell
52+ api-cli run update-module --data ' {"module_url":"ghcr.io/geniusdynamics/mautic:latest","instances":["mautic1"],"force":true}'
53+
54+ ```
55+
5156## Uninstall
5257
5358To uninstall the instance:
59+
5460``` shell
5561 remove-module --no-preserve mautic1
5662```
57-
5863
5964## Smarthost setting discovery
6065
6166Some configuration settings, like the smarthost setup, are not part of the
6267` configure-module ` action input: they are discovered by looking at some
63- Redis keys. To ensure the module is always up-to-date with the
68+ Redis keys. To ensure the module is always up-to-date with the
6469centralized [ smarthost
6570setup] ( https://geniusdynamics.github.io/ns8-core/core/smarthost/ ) every time
6671mautic starts, the command ` bin/discover-smarthost ` runs and refreshes
@@ -80,23 +85,25 @@ expected to work: it can be rewritten or discarded completely.
8085some CLI are needed to debug
8186
8287- The module runs under an agent that initiate a lot of environment variables (in /home/mautic1/.config/state), it could be nice to verify them
83- on the root terminal
88+ on the root terminal
8489
85- `runagent -m mautic1 env`
90+ `runagent -m mautic1 env`
8691
8792- you can become runagent for testing scripts and initiate all environment variables
88-
89- ` runagent -m mautic1 `
9093
91- the path become :
94+ ` runagent -m mautic1 `
95+
96+ the path become :
97+
9298```
9399 echo $PATH
94100 /home/mautic1/.config/bin:/usr/local/agent/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/
95101```
96102
97103- if you want to debug a container or see environment inside
98- ` runagent -m mautic1 `
99- ```
104+ ` runagent -m mautic1 `
105+
106+ ```
100107podman ps
101108CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
102109d292c6ff28e9 localhost/podman-pause:4.6.1-1702418000 9 minutes ago Up 9 minutes 127.0.0.1:20015->80/tcp 80b8de25945f-infra
@@ -105,6 +112,7 @@ d8df02bf6f4a docker.io/library/mariadb:10.11.5 --character-set-s... 9
105112```
106113
107114you can see what environment variable is inside the container
115+
108116```
109117podman exec mautic-app env
110118PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
@@ -127,13 +135,13 @@ you can run a shell inside the container
127135
128136```
129137podman exec -ti mautic-app sh
130- / #
138+ / #
131139```
140+
132141## Testing
133142
134143Test the module using the ` test-module.sh ` script:
135144
136-
137145 ./test-module.sh <NODE_ADDR> ghcr.io/geniusdynamics/mautic:latest
138146
139147The tests are made using [ Robot Framework] ( https://robotframework.org/ )
0 commit comments