This post will guide you through on how one of our employees set up an entire ForgeRock AM development environment connecting to replicated external Directory Services (DS) and a resource to protect with Apache web agent on different containers with the help of Docker and Docker Compose. This can help simulate a production environment where there is separation of services on different servers.
Setup
Ensure Docker and Docker Compose is installed on your machine, instructions to install it can be located on the Docker website at https://docs.docker.com/compose/install/
Download the official Amster ZIP file from ForgeRock from the same link as step 2 and place it at [Path to Source Codes] -> buildfiles -> am -> Amster.zip
Run docker-compose up --build to start building the environment and eventually it will start.
Set your computer's local hosts file to point am.example.com, cts.example.com, cts2.example.com, cfg1.example.com, cfg2.example.com to your localhost 127.0.0.1.
Run this command if you wish to use Amster to bootstrap the initial configuration: docker exec am.example.com ./bootstrap.sh (desired AMAdmin password) cfg.example.com. Alternatively, you can run Amster interactively using: docker exec -it am.example.com ./amster or use the web configurator wizard at http://am.example.com:8080/am to set it up, do follow the image file configurator_summary_details.png for the values for configuration.
container_name and hostname to be the same Fully Qualified Domain Name (FQDN)
build must contain context: buildfiles/ds
image is can be anything you want to call the DS image
ports require external ports for the internal ports 80, 443, 389, 646, 4444 to be configured
volumes will require persistent volume for the internal path /root/.opendj/ to be configured
networks give any ipv4_address that is available, preferably in the same subnet.
env_file leave it as .env
environment: HOST must be the same as container_name TYPE is a list of types that can be delimited by any character, it can contain the few keywords: Starting with directory or replication: directory or replication-only server Contains replication: to configure replication Requires MASTER_HOST and MASTER_ROOT_PASS environment variables set to the FQDN and root password of the DS you wish to replicate this instance with. Requires SLAVE_HOST environment variable to be the same as HOST Contains cts or tokens: setup using Core Token Service (CTS) profile Requires DS_CTS_PASS environment variable to set the CTS data store admin password Contains cfg or config: setup using AM configuration profile Requires DS_CONFIG_PASS environment variable to set the config data store admin password Contains ids or user: setup using identity store profile Requires DS_IDS_PASS environment variable to set the config data DS_ROOT_PASS is the root user cn=Directory Manager's password DS_MONITOR_PASS is the monitor user's password i.e. directory-replication-cts-cfg-ids
Access Manager
container_name and hostname to be the same Fully Qualified Domain Name (FQDN)
build must contain context: buildfiles/am
image is can be anything you want to call the AM image
ports require external ports for the internal ports 8080 to be configured
volumes will require persistent volume for the internal path /root/am and/root/.openamcfg to be configured. /tmp/treenodes is optional for additional tree nodes.
networks give any ipv4_address that is available, preferably in the same subnet.
env_file leave it as .env
environment: DIRECTORIES a list of FQDN and port of DS LDAPS ports delimited by a space to automatically query and trust certificates with.
Explanation of Shell Scripts
Access Manager
docker.sh
The shell script the Docker container will initialize with.
bootstrap.sh
Used to quickly configure a basic AM instance using Amster.
setenv.sh
Directory Service
docker.sh
Disclaimer
The document and content made available by Nebulas Tree in no way conveys any right, title, interest or license in any intellectual property rights (including but not limited to patents, copyrights, trade secrets or trademarks) contained herein. Nebulas Tree reserves the right to vary the terms of the document and content in response to changes to the specifications or information made available to Nebulas Tree.
Nebulas Tree does not assume liability for any errors or omissions in the content of this document or any referenced or associated third party document, including, but not limited to, typographical errors, inaccuracies or outdated information. This document and all information within it are provided on an "as is" basis without any warranties of any kind, express or implied. Any communication required or permitted in terms of this document shall be valid and effective only if submitted in writing. Reliance of any information provided herein this document is solely at your own risk.