Skip to content

Commit 2c58caa

Browse files
Update for Convertigo 8.1.0 documentation: use PouchDB and configure SSL (#2244)
1 parent e27b8b7 commit 2c58caa

File tree

1 file changed

+85
-16
lines changed

1 file changed

+85
-16
lines changed

convertigo/content.md

Lines changed: 85 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ $ docker run --name C8O -d -p 28080:28080 %%IMAGE%%
2323

2424
This will start a container running the minimum Convertigo server. Convertigo uses images' **/workspace** directory to store configuration file and deployed projects as an Docker volume.
2525

26-
You can access the Server admin console on http://[dockerhost]:28080/convertigo and login using the default credentials: admin / admin
26+
You can access the Server admin console on `http://[dockerhost]:28080/convertigo` and login using the default credentials: `admin / admin`.
27+
28+
The Server can also be accessed by HTTPS on `https://[dockerhost]:28443/convertigo` if SSL is configured (see the **HTTPS** section below).
2729

2830
## Link Convertigo to a CouchDB database for FullSync (Convertigo EE only)
2931

30-
Convertigo FullSync module uses Apache CouchDB 2.3.1 as NoSQL repository. You can use the **[couchdb](https://hub.docker.com/_/couchdb/)** docker image and link to it convertigo this way
32+
Convertigo FullSync module uses Apache CouchDB 3.2.2 as NoSQL repository. You can use the **[couchdb](https://hub.docker.com/_/couchdb/)** docker image and link to it convertigo this way
3133

3234
Launch CouchDB container and name it 'fullsync'
3335

3436
```console
35-
$ docker run -d --name fullsync couchdb:2.3.1
37+
$ docker run -d --name fullsync couchdb:3.2.2
3638
```
3739

3840
Then launch Convertigo and link it to the running 'fullsync' container. Convertigo Low Code sever will automatically use it as its fullsync repository.
@@ -41,11 +43,21 @@ Then launch Convertigo and link it to the running 'fullsync' container. Converti
4143
$ docker run -d --name C8O --link fullsync:couchdb -p 28080:28080 %%IMAGE%%
4244
```
4345

46+
## Use embedded PouchDB as FullSync engine (not for production)
47+
48+
Convertigo FullSync is designed to use CouchDB server or cluster. Convertigo FullSync is also compatible with PouchDB but only for little projects or tests. Internet access is required to enable this feature.
49+
50+
It can be enabled directly at startup:
51+
52+
```console
53+
$ docker run -d --name C8O -e JAVA_OPTS="-Dconvertigo.engine.fullsync.pouchdb=true" -p 28080:28080 %%IMAGE%%
54+
```
55+
4456
## Link Convertigo Low Code Server to a Billing & Analytics database
4557

4658
### MySQL
4759

48-
MySQL is the recommended database for holding Convertigo MBaaS server analytics. You can use this command to run convertigo and link it to a running MySQL container. Change `[mysql-container]` to the container name, and `[username for the c8oAnalytics db]`, `[password for specified db user]` with the values for your MySQL configuration.
60+
MySQL is the recommended database for holding Convertigo Low Code server analytics. You can use this command to run convertigo and link it to a running MySQL container. Change `[mysql-container]` to the container name, and `[username for the c8oAnalytics db]`, `[password for specified db user]` with the values for your MySQL configuration.
4961

5062
```console
5163
$ docker run -d --name C8O --link [mysql-container]:mysql -p 28080:28080 \
@@ -95,7 +107,7 @@ COPY myDependency.car /usr/local/tomcat/webapps/convertigo/WEB-INF/default_user_
95107

96108
The default administration account of a Convertigo server is **admin** / **admin** and the **testplatform** is anonymous.
97109

98-
These accounts can be configured through the *administration console* and saved in the **workspace**.
110+
These accounts can be configured through the **administration console** and saved in the **workspace**.
99111

100112
### `CONVERTIGO_ADMIN_USER` and `CONVERTIGO_ADMIN_PASSWORD` Environment variables
101113

@@ -113,11 +125,66 @@ You can lock the **testplatform** by setting the account :
113125
$ docker run -d --name C8O -e CONVERTIGO_TESTPLATFORM_USER=tp_user -e CONVERTIGO_TESTPLATFORM_PASSWORD=s3cret -p 28080:28080 %%IMAGE%%
114126
```
115127

128+
## HTTPS / SSL Configuration
129+
130+
In many cases, the Convertigo instance is behind a reverse proxy that handles HTTPS / SSL configuration. But you can configure the container to manage existing SSL certificates or dynamically generate one.
131+
132+
If the SSL configuration is correct, the Convertigo Server will listen **HTTP** on port `28080` and **HTTPS** on port `28443`.
133+
134+
### Provide existing certificate using the /ssl mount point
135+
136+
If you have an existing certificate and a private key, you can put them in **PEM** format in a folder (or in a Kubernetes secret):
137+
138+
- `key.pem` : the private key in PEM format (no password)
139+
- `cert.pem` : the server certificate in PEM format, can also contain the full chain of certificates
140+
- `chain.pem` : the optional chain of certificates not included in `cert.pem` using the PEM format
141+
142+
```console
143+
$ docker run -d --name C8O -v <my SSL folder>:/ssl -p 28443:28443 %%IMAGE%%
144+
```
145+
146+
If you want to expose both **HTTP** and **HTTPS** you can expose both **ports**:
147+
148+
```console
149+
$ docker run -d --name C8O -v <my SSL folder>:/ssl -p 28080:28080 -p 28443:28443 %%IMAGE%%
150+
```
151+
152+
### Provide existing certificate using environment variables
153+
154+
If you cannot mount a volume, you can probably add environment variables of previously described files. Content cannot be set directly in a variable but their base64 version can. Here are the variables to configure:
155+
156+
- `SSL_KEY_B64` : the private key in base64 PEM format (no password)
157+
- `SSL_CERT_B64` : the server certificate in base64 PEM format, can also contain the full chain of certificates
158+
- `SSL_CHAIN_B64` : the optional chain of certificates not included in `cert.pem` using the base64 PEM format
159+
160+
```console
161+
$ SSL_KEY_B64=$(base64 key.pem)
162+
$ SSL_CERT_B64=$(base64 cert.pem)
163+
$ SSL_CHAIN_B64=$(base64 chain.pem)
164+
$ docker run -d --name C8O -e SSL_KEY_B64="$SSL_KEY_B64" -e SSL_CERT_B64="$SSL_CERT_B64" -e SSL_CHAIN_B64="$SSL_CHAIN_B64" -p 28443:28443 %%IMAGE%%
165+
```
166+
167+
### Generate and use a self-signed certificate
168+
169+
If you don't have certificate file, you can dynamically generate one for the first start. This will be an untrusted certificate for Browsers and HTTPS clients. This shouldn't be used for production environment.
170+
171+
Use the `SSL_SELFSIGNED` environment variable to indicate for what domain you want generate certificate.
172+
173+
```console
174+
$ docker run -d --name C8O -e SSL_SELFSIGNED=mycomputer -p 28443:28443 %%IMAGE%%
175+
```
176+
177+
Generated files can be retrieved if the `/ssl` mount point is configured on folder without `cert.pem` nor `key.pem`.
178+
179+
```console
180+
$ docker run -d --name C8O -v <my empty SSL folder>:/ssl -e SSL_SELFSIGNED=mycomputer -p 28443:28443 %%IMAGE%%
181+
```
182+
116183
## `JAVA_OPTS` Environment variable
117184

118-
Convertigo is based on a *Java* process with some defaults *JVM* options. You can override our defaults *JVM* options with you own.
185+
Convertigo is based on a **Java** process with some defaults **JVM** options. You can override our defaults **JVM** options with you own.
119186

120-
Add any *Java JVM* options such as -D[something] :
187+
Add any **Java JVM** options such as -D[something] :
121188

122189
```console
123190
$ docker run -d --name C8O -e JAVA_OPTS="-DjvmRoute=server1" -p 28080:28080 %%IMAGE%%
@@ -137,7 +204,7 @@ $ docker run -d --name C8O -e JXMX="4096" -p 28080:28080 %%IMAGE%%
137204

138205
## `COOKIE_PATH` Environment variable
139206

140-
Convertigo generates a `JSESSIONID` to maintain the user session and stores in a *cookie*. The *cookie* is set for the server path `/` by default. In case of a front server with multiple services for different paths, you can set a path restriction for the *cookie* with the `JSESSIONID`. Just define the `COOKIE_PATH` environment variable with a compatible path.
207+
Convertigo generates a `JSESSIONID` to maintain the user session and stores in a **cookie**. The **cookie** is set for the server path `/` by default. In case of a front server with multiple services for different paths, you can set a path restriction for the **cookie** with the `JSESSIONID`. Just define the `COOKIE_PATH` environment variable with a compatible path.
141208

142209
The default `COOKIE_PATH` value is `/` and can be defined :
143210

@@ -147,41 +214,43 @@ $ docker run -d --name C8O -e COOKIE_PATH="/convertigo" -p 28080:28080 %%IMAGE%%
147214

148215
## `COOKIE_SECURE` Environment variable
149216

150-
Convertigo use a *cookie* to maintain sessions. Requests on port `28080` are *HTTP* but we advice to use an *HTTPS* front for production (nginx, kubenetes ingress, ...). In this case, you can secure yours cookies to be used only with secured connections by adding the `Secure` flag.
217+
Convertigo uses a **cookie** to maintain sessions. Requests on port `28080` are **HTTP** but we advise to use an **HTTPS** front for production (nginx, kubernetes ingress, ...). In this case, you can secure your cookies to be used only with secured connections by adding the `Secure` flag.
151218

152-
The Secure flag can be enabled by setting the `COOKIE_SECURE` environment variable to `true`. Once enabled, cookies and sessions aren't working through an *HTTP* connection.
219+
The Secure flag can be enabled by setting the `COOKIE_SECURE` environment variable to `true`. Once enabled, cookies and sessions aren't working through an **HTTP** connection.
153220

154221
The default `COOKIE_SECURE` value is `false` and can be defined :
155222

156223
```console
157224
$ docker run -d --name C8O -e COOKIE_SECURE="true" -p 28080:28080 %%IMAGE%%
158225
```
159226

227+
**Note :** if you have set the **SSL** configuration and you access the **HTTPS 28443** port, cookies are automatically `Secure`.
228+
160229
## `COOKIE_SAMESITE` Environment variable
161230

162-
Allow to configure the *SameSite* parameter for generated cookies. Can be empty, `none`, `lax` or `strict`.
231+
Allow to configure the **SameSite** parameter for generated cookies. Can be empty, `none`, `lax` or `strict`.
163232

164-
The default `COOKIE_SAMESITE` value is *empty* and can be defined this way:
233+
The default `COOKIE_SAMESITE` value is **empty** and can be defined this way:
165234

166235
```console
167236
$ docker run -d --name C8O -e COOKIE_SAMESITE=lax -p 28080:28080 %%IMAGE%%
168237
```
169238

170239
## `SESSION_TIMEOUT` Environment variable
171240

172-
Allow to configure the default Tomcat *session-timeout* in minutes. This value is used for non-project calls (Administration console, Fullsync...). This value is overridden by each projects' calls (Sequence, Transaction ...).
241+
Allow to configure the default Tomcat **session-timeout** in minutes. This value is used for non-project calls (Administration console, Fullsync...). This value is overridden by each projects' calls (Sequence, Transaction ...).
173242

174-
The default `SESSION_TIMEOUT` value is *30* and can be defined this way:
243+
The default `SESSION_TIMEOUT` value is **30** and can be defined this way:
175244

176245
```console
177246
$ docker run -d --name C8O -e SESSION_TIMEOUT=5 -p 28080:28080 %%IMAGE%%
178247
```
179248

180249
## `DISABLE_SUDO` Environment variable
181250

182-
The image include *sudo* command line, configured to allow the *convertigo* user to use it without password and to perform some *root* action inside the container. This variable allow to disable this permission.
251+
The image include **sudo** command line, configured to allow the **convertigo** user to use it without password and to perform some **root** action inside the container. This variable allows to disable this permission.
183252

184-
The default `DISABLE_SUDO` value is *empty* and can be defined this way:
253+
The default `DISABLE_SUDO` value is **empty** and can be defined this way:
185254

186255
```console
187256
$ docker run -d --name C8O -e DISABLE_SUDO=true -p 28080:28080 %%IMAGE%%

0 commit comments

Comments
 (0)