cc-docker/README.md

79 lines
3.7 KiB
Markdown
Raw Normal View History

2021-05-19 07:49:23 +02:00
# cc-docker
2021-05-19 07:53:28 +02:00
2021-09-13 15:28:02 +02:00
This is a setup for `docker compose` to try out a complete ClusterCockpit Application Stack including all external components. This docker setup can be easily configured to be used as demo or as a development environment for ClusterCockpit.
2021-05-19 14:56:25 +02:00
2021-06-14 11:09:57 +02:00
It creates containers for:
2021-05-19 14:56:25 +02:00
* mysql
* php-fpm
2021-05-19 14:56:25 +02:00
* nginx
2021-09-07 16:17:37 +02:00
* redis
2021-09-07 16:14:14 +02:00
* openldap
2021-09-13 15:28:02 +02:00
* influxdb
* phpmyadmin
2021-05-19 14:56:25 +02:00
2021-09-13 15:28:02 +02:00
All settings are configured in `.env`. The setup comes with fixture data for a job archive, influxDB, mySQL and a LDAP user directory.
2021-05-19 07:53:28 +02:00
## Known Issues
2021-06-09 09:53:35 +02:00
2021-06-10 13:21:59 +02:00
* `docker-compose` installed on Ubuntu (18.04, 20.04) via `apt-get` can not correctly parse `docker-compose.yml` due to version differences. Install latest version of `docker-compose` from https://docs.docker.com/compose/install/ instead.
2021-06-10 12:08:22 +02:00
* You need to ensure that no other web server is running on port 80 (e.g. Apache2). If port 80 is already in use, edit NGINX_PORT environment variable in `.env`.
* Existing VPN connections sometimes cause problems with docker. If `docker-compose` does not start up correctly, try disabling any active VPN connection. Refer to https://stackoverflow.com/questions/45692255/how-make-openvpn-work-with-docker for further information.
2021-09-13 15:28:02 +02:00
## Configuration
While many aspects of this docker compose setup can be configured you ussually only need to adapt the following three settings in `.env`:
* `CLUSTERCOCKPIT_BRANCH` (Default: `develop`): The branch to checkout from ClusterCockpit git repository. May also be a tag.
* `APP_CLUSTERCOCKPIT_INIT` (Default: true): Wether the Symfony tree (located at `./data/symfony`) should be deleted and freshly cloned and setup on every container startup.
* `APP_ENVIRONMENT` (Default: `dev`): The Symfony App environment. With `dev` you get a Debugging Toolbar and more extensive error handling. Using `prod` is a setup for productions usage.
## Setup
* `$ cd data`
2021-09-13 15:28:02 +02:00
* `$ ./init.sh`: The script asks for sudo rights as the file ownership needs to changed for some folders. **NOTICE** The script will download files of total size of 338MB (most for the InfluxDB data).
2021-06-09 09:53:35 +02:00
After that from the root of the repository you can start up the containers with:
* `docker-compose up`
* Wait... and wait a little longer
2021-09-13 15:28:02 +02:00
Before you can use ClusterCockpit the following disclaimer must be shown. To download and build all ClusterCockpit components may take up to several minutes:
2021-06-23 14:33:25 +02:00
```
2021-09-13 15:28:02 +02:00
-------------------- ---------------------------------
Symfony
-------------------- ---------------------------------
Version 5.3.7
Long-Term Support No
End of maintenance 01/2022 (in +140 days)
End of life 01/2022 (in +140 days)
-------------------- ---------------------------------
Kernel
-------------------- ---------------------------------
Type App\Kernel
Environment dev
Debug true
Charset UTF-8
Cache directory ./var/cache/dev (6.5 MiB)
Build directory ./var/cache/dev (6.5 MiB)
Log directory ./var/log (249 B)
-------------------- ---------------------------------
PHP
-------------------- ---------------------------------
Version 8.0.10
Architecture 64 bits
Intl locale n/a
Timezone UTC (2021-09-13T09:41:33+00:00)
OPcache true
APCu false
Xdebug false
-------------------- ---------------------------------
```
By default, you can access ClusterCockpit in your browser at http://localhost . If the `NGINX_PORT` environment variable was changed, use `http://localhost:$PORT` . You can shutdown the containers by pressing `CTRL-C`.
## Usage
Credentials for the preconfigured admin user are:
* User: `admin`
* Password: `AdminDev`
2021-09-13 15:28:02 +02:00
You can also login as regular user using any credential in the LDAP user directory at `./data/ldap/users.ldif`.