Giter Site home page Giter Site logo

oskar-flores / docker-confluence-for-testing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aruizca/docker-confluence-for-testing

0.0 1.0 0.0 215 KB

Docker image to run Atlassian Confluence for testing

License: Apache License 2.0

Dockerfile 18.05% Shell 81.95%

docker-confluence-for-testing's Introduction

Docker-confluence-for-testing (WIP)

Script that provides a one-off command to locally run any Atlassian Confluence version using an Oracle JRE on a Docker container.

It's purpose is just for quickly spin up any standalone version of Confluence to perform tests on it.

⚠️Important! This is not intended to be used in a production system.

Requirements

The only requirement is to have Docker installed.

Adjusting the available RAM for the Docker engine to at least 4GB is also required. You can find the settings in Docker -> Preferences -> Advanced.

Usage

Its main usage includes a container which will make use of the puppeteer-confluence-setup image at Docker Hub to automate also the initial setup process. For more info go to the puppeteer-confluence-setup GitHub repo.

./scripts/run-confluence-container.sh [x.y.z]

If you want to perform the setup process manually:

./scripts/run-confluence-container-no-setup.sh [x.y.z]

x.y.z is an optional parameter with the Confluence version number you want to run.

Otherwise the default version that appears on the .env file will be used.

Confluence instance will be listening on http://localhost:8090/confluence

Additional settings

./scripts/run-confluence-container.sh [x.y.z] [ENV=VALUE ENV2=VALUE]

⚠️ Note that it is recommended to provided an environment variable with a valid Confluence instance license, otherwise a 3 hours timebomb license provided by Atlassian will be used. Example:

PPTR_CONFLUENCE_LICENSE=...

Other useful scripts

  • install-app.sh: script to install an app via URL or file path. install-app.sh -h for details.

  • install-app-license.sh: script to add licensing to a previously installed app. install-app-license.sh -h for details.

  • full-app-setup-example.sh: this example shows the full cycle of installing Confluence, set it up, install an app, and add a license. This is useful to prepare the environment to execute e2e tests.

Java JDK

You can choose with version of java is going to be installed in container. To use this feature, you need to set JAVA_VERSION variable when runing the container.

Java version should be in the format vendor@version, as used in JABBA. If no JAVA_VERSION is set, by default, version to be installed is: [email protected]

For example , to run a container with confluece 5.4.4 (which need java 7) and the zulu 1.7.95 version (which is supportorted by JABBA):

./scripts/run-confluence-container.sh 5.4.4 [email protected]

You can check available vendor/version

https://github.com/shyiko/jabba/blob/master/index.json

Database selection

By default, it uses postgres, but to make it easier to test with, now the script can also run diferent databases. This databases are ready to work, and already configured to work with confluence, so there is no need to do any modification (althouh you many need to install the driver into confluence)

These are the new supported databases:

mysql:

  • version: 5.6
  • db: confluence
  • user: confluenceUser
  • pass: confluenceUser
  • root pass: password

oracle

  • version: 2017
  • b: confluence
  • user: confluenceUser
  • pass: confluenceUser
  • root pass: Confluenc3

sqlserver

  • version: 12C
  • db: CONFLUENCE_TS
  • user: confluence
  • pass: confluence
  • sid: xe

For example to run the oracle database jsut do the following:

./scripts/run-confluence-container.sh [x.y.z] DATABASE=oracle

Debugging port

By default debugging port from host is 5006 but you can customise

DEBUG_PORT=5006

Change container localization and timezone

TZ=America/Los_Angeles
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8

Runtime Environment Setup

Several other services are started up along with the Confluence instance to customize your setup:

Database

Instead of using the embedded H2 DB, you can configure your Confluence instance to use a proper DB engine. In fact this is really advisable if you want to run a Confluence version >= 6.x and use collaborative editing.

At the moment only PostgreSQL is available but we plan to support other DB engines in the future.

PostgreSQL

By default a container named "postgres" is up using version 9.6, which seems to be the minimum version to run collaborative editing service "Synchrony" without issues.

Details

  • Container name and hostname: postgres
  • DB name: confluence
  • DB username: postgres
  • DB password: postgres
  • JDBC connection URL: jdbc:postgresql://postgres:5432/confluence

Changing version

You can change the default PostgreSQL version (9.6) by adding the environment variable POSTGRESQL_VERSION. Eg:

./scripts/run-confluence-container.sh 6.15.1 POSTGRESQL_VERSION=10.2

You can use any of the versions available in the official PostgreSQL Docker repository

⚠️Important! Versions earlier that 9.6 present problems with Collaborative Editing feature.

DB recommended version

Confluence Version PostgreSQL version
5.8.x - 5.10.x 9.5
6.0.x - ... 9.6

External user directory

Most companies use an external directory services to manage users authentication and authorization. To test that scenario I have forked and customized a Docker image with OpenLDAP in this repository, so it can be used out of the box for that purpose.

A container using this image will be run along with Confluence and available if needed.

That repo contains also the setting to configure it inside Confluence.

Troubleshooting

After setting up Confluence everything is slow

This might be due to the synchrony server (collaborative editing) failing to start up correctly. You can disable synchrony via REST API using the following GET request:

http://localhost:8090/confluence/rest/synchrony-interop/disable?os_username=admin&os_password=admin

Also makes sure that in the Advanced Docker preferences the amount of RAM available for the Docker engine is at least 4GB.

Windows 10

When cloning this repo to a Windows machine, file endings won't be the same as in Unix. To avoid this, you can either clone the repo specifying this option:

git clone [email protected]:aruizca/docker-confluence-for-testing.git --config core.autocrlf=input

Or modify the entrypoint.sh file to use Unix file ending (LF) instead of Windows file ending (CRLF).

docker-confluence-for-testing's People

Contributors

aruizca avatar oskar-flores avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.