Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: docker installation #3027

Merged
merged 9 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions docs/admin/install/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
!!! Warning
**This image is for testing and development purposes only. Use Janssen [helm charts](../charts) for production setups.**

## Overview

Docker monolith image packaging for Janssen. This image packs janssen services including the auth-server, config-api, fido2, and scim.

## Pre-requisites

- [Docker](https://docs.docker.com/install)
- [Docker compose](https://docs.docker.com/compose/install/)


## Environment Variables

Installation depends on a set of environment variables. These environment variables can be set to customize installation as per the need. If not set, the installer uses default values.

| ENV | Description | Default |
|-------------------------|--------------------------------------------------|--------------------------------------------------|
| `CN_HOSTNAME` | Hostname to install janssen with. | `demoexample.jans.io` |
| `CN_ADMIN_PASS` | Password of the admin user. | `1t5Fin3#security` |
| `CN_ORG_NAME` | Organization name. Used for ssl cert generation. | `Janssen` |
| `CN_EMAIL` | Email. Used for ssl cert generation. | `support@jans.io` |
| `CN_CITY` | City. Used for ssl cert generation. | `Austin` |
| `CN_STATE` | State. Used for ssl cert generation | `TX` |
| `CN_COUNTRY` | Country. Used for ssl cert generation. | `US` |
| `CN_INSTALL_LDAP` | **NOT SUPPORRTED YET** | `false` |
| `CN_INSTALL_CONFIG_API` | Installs the Config API service. | `true` |
| `CN_INSTALL_SCIM` | Installs the SCIM API service. | `true` |
| `CN_INSTALL_FIDO2` | Installs the FIDO2 API service. | `true` |
| `MYSQL_DATABASE` | MySQL jans database. | `jans` |
| `MYSQL_USER` | MySQL database user. | `jans` |
| `MYSQL_PASSWORD` | MySQL database user password. | `1t5Fin3#security` |
| `MYSQL_HOST` | MySQL host. | `mysql` which is the docker compose service name |


## How to run

Download the compose file

```bash

wget https://raw.githubusercontent.com/JanssenProject/jans/main/docker-jans-monolith/jans-mysql-compose.yml
```

This docker compose file run two containers, the janssen monolith container and mysql container.

```bash
docker compose -f jans-mysql-compose.yml up -d
```

To see the containers running

```bash

docker ps
```

## Configure

```bash
docker ps #List the containers running. Copy the container name of monolith jans

docker exec -ti <monolith_container_name> bash #This opens a bash terminal in the running container

/opt/jans/jans-cli/config-cli.py #configure config-cli

/opt/jans/jans-cli/scim-cli.py #configure scim
```

## Access endpoints externally

Add to your `/etc/hosts` file the ip domain record which should be the ip of the instance docker is installed at and the domain used in the env above `CN_HOSTNAME`.

```bash
# For-example
172.22.0.3 demoexample.jans.io
```

After adding the record you can hit endpoints such as https://demoexample.jans.io/.well-known/openid-configuration

## Clean up

Remove setup and volumes

```
docker compose -f jans-mysql-compose.yml down && rm -rf jans-*
```
93 changes: 0 additions & 93 deletions docs/admin/install/vm-install/quick-start-install.md

This file was deleted.

3 changes: 1 addition & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,9 @@ nav:
- 'Passwordless Authentication': 'admin/planning/passwordless-auth.md'
- 'Machine-to-Machine Authentication': 'admin/planning/machine-to-machine.md'
- 'Installation':
- 'admin/install/README.md'
- 'VM Installation':
- 'admin/install/vm-install/README.md'
- 'VM Requirements': 'admin/install/vm-install/vm-requirements.md'
- 'Docker Quick Start': 'admin/install/vm-install/quick-start-install.md'
- 'Ubuntu': 'admin/install/vm-install/ubuntu.md'
- 'RHEL': 'admin/install/vm-install/rhel.md'
- 'Suse': 'admin/install/vm-install/suse.md'
Expand All @@ -158,6 +156,7 @@ nav:
- 'Microsoft Azure AKS': 'admin/install/helm-install/microsoft-azure.md'
# - 'Red Hat Open Shift': 'admin/install/helm-install/red-hat-open-shift.md'
- 'Using Rancher Marketplace': 'admin/install/helm-install/rancher.md'
- 'Docker Installation': 'admin/install/docker.md'
- 'Setup Instructions': 'admin/install/setup.md'
- 'FAQ': 'admin/install/install-faq.md'
- 'Kubernetes Operation Guide':
Expand Down