From c919b224fb240c968f1be7bc0809cea82fb9432e Mon Sep 17 00:00:00 2001 From: Raquel Campuzano Godoy Date: Fri, 7 Oct 2016 17:48:56 +0200 Subject: [PATCH 1/8] Add Docker for Windows application access --- bitnami/jasperreports/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bitnami/jasperreports/README.md b/bitnami/jasperreports/README.md index 6b9609275006..3ce8b4356ce9 100644 --- a/bitnami/jasperreports/README.md +++ b/bitnami/jasperreports/README.md @@ -39,8 +39,10 @@ volumes: jasperserver_data: driver: local ``` +Then you can access your application at http://your-ip/. Enter bitnami default username and password: +`user/ bitnami` -### Run the application manually +## Run the application manually If you want to run the application manually instead of using docker-compose, these are the basic steps you need to run: @@ -56,7 +58,14 @@ If you want to run the application manually instead of using docker-compose, the $ docker run -d -p 80:8080 --name jasperserver --net=jasperserver_network bitnami/jasperserver ``` -Then you can access your application at http://your-ip/ +Then you can access your application at http://your-ip/. Enter bitnami default username and password: +`user/ bitnami` + +>**Note!** If you are using Docker for Windows (regardless of running the application using Docker compose or manually) you must check the Docker virtual machine IP executing this command: + +`docker-machine ip` + +This IP address allowing you to access to your application. ## Persisting your application From b683ce7597248e89b1c5e9569e18f0dd68a4a5f1 Mon Sep 17 00:00:00 2001 From: Raquel Campuzano Godoy Date: Fri, 7 Oct 2016 18:04:39 +0200 Subject: [PATCH 2/8] Add Docker for Windows application access --- bitnami/jasperreports/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitnami/jasperreports/README.md b/bitnami/jasperreports/README.md index 3ce8b4356ce9..3fcd5393ca85 100644 --- a/bitnami/jasperreports/README.md +++ b/bitnami/jasperreports/README.md @@ -61,7 +61,7 @@ If you want to run the application manually instead of using docker-compose, the Then you can access your application at http://your-ip/. Enter bitnami default username and password: `user/ bitnami` ->**Note!** If you are using Docker for Windows (regardless of running the application using Docker compose or manually) you must check the Docker virtual machine IP executing this command: +>**Note!** If you are using **Docker for Windows** (regardless of running the application using Docker compose or manually) you must check the Docker virtual machine IP executing this command: `docker-machine ip` From 58ce39dd4b06cf067b2ef148aaf61a22c9884278 Mon Sep 17 00:00:00 2001 From: raquel-campuzano Date: Mon, 21 Nov 2016 17:00:09 +0100 Subject: [PATCH 3/8] Unify documentation persistence volumes Using Wordpress as a model. --- bitnami/jasperreports/README.md | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/bitnami/jasperreports/README.md b/bitnami/jasperreports/README.md index 3fcd5393ca85..c17dd11a2ddd 100644 --- a/bitnami/jasperreports/README.md +++ b/bitnami/jasperreports/README.md @@ -69,13 +69,17 @@ This IP address allowing you to access to your application. ## Persisting your application -If you remove every container and volume all your data will be lost, and the next time you run the image the application will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed. If you are using docker-compose your data will be persistent as long as you don't remove `application_data` data volume. If you have run the containers manually or you want to mount the folders with persistent data in your host follow the next steps: +If you remove every container and volume all your data will be lost, and the next time you run the image the application will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed. + +For persistence of the JasperReports deployment, the above examples define docker volumes namely `tomcat_data` and `jasperserver_data`. The JasperReports application state will persist as long as these volumes are not removed. + +To avoid inadvertent removal of these volumes you can [mount host directories as data volumes](https://docs.docker.com/engine/tutorials/dockervolumes/). Alternatively you can make use of volume plugins to host the volume data. > **Note!** If you have already started using your application, follow the steps on [backing](#backing-up-your-application) up to pull the data from your running container down to your host. -### Mount persistent folders in the host using docker-compose +### Mount host directories as data volumes with Docker Compose -This requires a sightly modification from the template previously shown: +This requires a minor change to the `docker-compose.yml` template previously shown: ``` version: '2' @@ -90,29 +94,32 @@ services: application_data: image: bitnami/jasperserver:latest volumes: - - /bitnami/jasperserver - - /bitnami/tomcat + - /path/to/jasperserver-persistence:/bitnami/jasperserver + - /path/to/tomcat-persistence:/bitnami/tomcat entrypoint: 'true' mounts: - - /your/local/path/bitnami/jasperserver:/bitnami/jasperserver - - /your/local/path/bitnami/tomcat:/bitnami/tomcat + - /path/to/bitnami/jasperserver:/bitnami/jasperserver + - /path/to/bitnami/tomcat:/bitnami/tomcat ``` ### Mount persistent folders manually In this case you need to specify the directories to mount on the run command. The process is the same than the one previously shown: -1. If you haven't done this before, create a new network for the application: +1. Create a network (if it does not exist): ``` - $ docker network create jasperserver_network + $ docker network create jasperserver-tier ``` -2. Run the JasperReports container: +2. Create the JasperReports container with host volume: ``` - $ docker run -d -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --network=jasperserver_network bitnami/jasperserver - ``` + $ docker run -d --name jasperserver -p 80:8080 \ + --net jasperserver-tier \ + --volume /path/to/jasperserver-persistence:/bitnami/jasperserver \ + --volume /path/to/tomcat-persistence:/bitnami/tomcat \ + bitnami/jasperserver:latest # Upgrade this application From 65853c11930e9be687d9da75576130f3f11ea3c9 Mon Sep 17 00:00:00 2001 From: raquel-campuzano Date: Wed, 23 Nov 2016 10:31:35 +0100 Subject: [PATCH 4/8] Fix docker-compose.yml for persist the application Remove wrong snippets. --- bitnami/jasperreports/README.md | 39 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/bitnami/jasperreports/README.md b/bitnami/jasperreports/README.md index c17dd11a2ddd..d12b6fabd7d0 100644 --- a/bitnami/jasperreports/README.md +++ b/bitnami/jasperreports/README.md @@ -80,26 +80,20 @@ To avoid inadvertent removal of these volumes you can [mount host directories as ### Mount host directories as data volumes with Docker Compose This requires a minor change to the `docker-compose.yml` template previously shown: -``` +```yaml version: '2' - services: - application: - image: bitnami/jasperserver:latest - ports: - - 80:8080 - volumes_from: - - application_data - - application_data: - image: bitnami/jasperserver:latest - volumes: - - /path/to/jasperserver-persistence:/bitnami/jasperserver - - /path/to/tomcat-persistence:/bitnami/tomcat - entrypoint: 'true' - mounts: - - /path/to/bitnami/jasperserver:/bitnami/jasperserver - - /path/to/bitnami/tomcat:/bitnami/tomcat + mariadb: bitnami/mariadb:latest + volumes: + - mariadb_data:/bitnami/mariadb +jasperserver: + image: bitnami/jasperserver:latest + depends_on: + - mariadb + ports: + - 80:8080 + volumes: + - /path/to/jasperserver-persistence:/bitnami/jasperserver ``` ### Mount persistent folders manually @@ -111,14 +105,19 @@ In this case you need to specify the directories to mount on the run command. Th ``` $ docker network create jasperserver-tier ``` +2. Create a MariaDB container with host volume: -2. Create the JasperReports container with host volume: + $ docker run -d --name mariadb \ + --net jasperserver-tier \ + --volume /path/to/mariadb-persistence:/bitnami/mariadb \ + bitnami/mariadb:latest + +3. Create the JasperReports container with host volume: ``` $ docker run -d --name jasperserver -p 80:8080 \ --net jasperserver-tier \ --volume /path/to/jasperserver-persistence:/bitnami/jasperserver \ - --volume /path/to/tomcat-persistence:/bitnami/tomcat \ bitnami/jasperserver:latest # Upgrade this application From 9f7d0e8d53de7649ab234dc64d1a13a87f4ccf18 Mon Sep 17 00:00:00 2001 From: raquel-campuzano Date: Wed, 23 Nov 2016 11:21:59 +0100 Subject: [PATCH 5/8] Add the bash and yaml syntax highlight --- bitnami/jasperreports/README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/bitnami/jasperreports/README.md b/bitnami/jasperreports/README.md index d12b6fabd7d0..8425b618d049 100644 --- a/bitnami/jasperreports/README.md +++ b/bitnami/jasperreports/README.md @@ -15,7 +15,7 @@ To run this application you need Docker Engine 1.10.0. Docker Compose is recomen This is the recommended way to run JasperReports. You can use the following docker compose template: -``` +```yaml version: '2' services: @@ -48,13 +48,13 @@ If you want to run the application manually instead of using docker-compose, the 1. Create a new network for the application: - ``` + ```bash $ docker network create jasperserver_network ``` 2. Run the JasperReports container: - ``` + ```bash $ docker run -d -p 80:8080 --name jasperserver --net=jasperserver_network bitnami/jasperserver ``` @@ -102,23 +102,26 @@ In this case you need to specify the directories to mount on the run command. Th 1. Create a network (if it does not exist): - ``` + ```bash $ docker network create jasperserver-tier ``` 2. Create a MariaDB container with host volume: +```bash $ docker run -d --name mariadb \ --net jasperserver-tier \ --volume /path/to/mariadb-persistence:/bitnami/mariadb \ bitnami/mariadb:latest +``` 3. Create the JasperReports container with host volume: - ``` + ```bash $ docker run -d --name jasperserver -p 80:8080 \ --net jasperserver-tier \ --volume /path/to/jasperserver-persistence:/bitnami/jasperserver \ bitnami/jasperserver:latest + ``` # Upgrade this application @@ -126,7 +129,7 @@ Bitnami provides up-to-date versions of JasperReports, including security patche 1. Get the updated images: -``` +```bash $ docker pull bitnami/jasperserver:latest ``` @@ -152,7 +155,7 @@ $ docker pull bitnami/jasperserver:latest When you start the jasperserver image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the docker run command line. If you want to add a new environment variable: * For docker-compose add the variable name and value under the application section: -``` +```yaml application: image: bitnami/jasperserver:latest ports: @@ -165,7 +168,7 @@ application: * For manual execution add a `-e` option with each variable and value: -``` +```bash $ docker run -d -e JASPERSERVER_PASSWORD=my_password -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --network=jasperserver_network bitnami/jasperserver ``` @@ -187,7 +190,7 @@ This would be an example of SMTP configuration using a GMail account: * docker-compose: -``` +```yaml application: image: bitnami/jasperserver:latest ports: @@ -203,7 +206,7 @@ This would be an example of SMTP configuration using a GMail account: * For manual execution: -``` +```bash $ docker run -d -e SMTP_HOST=smtp.gmail.com -e SMTP_PORT=587 -e SMTP_USER=your_email@gmail.com -e SMTP_PASSWORD=your_password -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --net=jasperserver_network bitnami/jasperserver ``` @@ -217,7 +220,7 @@ To backup your application data follow these steps: 2. Copy the JasperReports data folder in the host: -``` +```bash $ docker cp /your/local/path/bitnami:/bitnami/jasperserver ``` From 2a112be2e75f1d7288f728da0ffb13df32d716a0 Mon Sep 17 00:00:00 2001 From: raquel-campuzano Date: Wed, 23 Nov 2016 11:40:51 +0100 Subject: [PATCH 6/8] Fix indentation problems --- bitnami/jasperreports/README.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bitnami/jasperreports/README.md b/bitnami/jasperreports/README.md index 1882a4822284..80fd66ee1995 100644 --- a/bitnami/jasperreports/README.md +++ b/bitnami/jasperreports/README.md @@ -130,16 +130,12 @@ Bitnami provides up-to-date versions of JasperReports, including security patche 1. Get the updated images: -<<<<<<< HEAD ```bash $ docker pull bitnami/jasperserver:latest ``` -======= - ``` +```bash $ docker pull bitnami/jasperserver:latest - ``` ->>>>>>> bitnami/master - +``` 2. Stop your container * For docker-compose: `$ docker-compose stop jasperserver` @@ -227,7 +223,6 @@ To backup your application data follow these steps: 2. Copy the JasperReports data folder in the host: -<<<<<<< HEAD ```bash $ docker cp /your/local/path/bitnami:/bitnami/jasperserver ``` @@ -235,8 +230,6 @@ $ docker cp /your/local/path/bitnami:/bitnami/jasperserver ``` $ docker cp /your/local/path/bitnami:/bitnami/jasperserver ``` ->>>>>>> bitnami/master - # Restoring a backup To restore your application using backed up data simply mount the folder with JasperReports data in the container. See [persisting your application](#persisting-your-application) section for more info. From 776170d26b60fcb57d9bc921b37eb424c22ea97e Mon Sep 17 00:00:00 2001 From: raquel-campuzano Date: Wed, 23 Nov 2016 12:16:31 +0100 Subject: [PATCH 7/8] Fix indentation errors and bash highlighting --- bitnami/jasperreports/README.md | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/bitnami/jasperreports/README.md b/bitnami/jasperreports/README.md index 80fd66ee1995..4cffee6decdc 100644 --- a/bitnami/jasperreports/README.md +++ b/bitnami/jasperreports/README.md @@ -108,12 +108,12 @@ In this case you need to specify the directories to mount on the run command. Th ``` 2. Create a MariaDB container with host volume: -```bash + ```bash $ docker run -d --name mariadb \ --net jasperserver-tier \ --volume /path/to/mariadb-persistence:/bitnami/mariadb \ bitnami/mariadb:latest -``` + ``` 3. Create the JasperReports container with host volume: @@ -130,28 +130,26 @@ Bitnami provides up-to-date versions of JasperReports, including security patche 1. Get the updated images: -```bash -$ docker pull bitnami/jasperserver:latest -``` -```bash + ```bash $ docker pull bitnami/jasperserver:latest -``` + ``` + 2. Stop your container - * For docker-compose: `$ docker-compose stop jasperserver` - * For manual execution: `$ docker stop jasperserver` + * For docker-compose: `$ docker-compose stop jasperserver` + * For manual execution: `$ docker stop jasperserver` 3. (For non-compose execution only) Create a [backup](#backing-up-your-application) if you have not mounted the jasperserver folder in the host. 4. Remove the currently running container - * For docker-compose: `$ docker-compose rm -v jasperserver` - * For manual execution: `$ docker rm -v jasperserver` + * For docker-compose: `$ docker-compose rm -v jasperserver` + * For manual execution: `$ docker rm -v jasperserver` 5. Run the new image - * For docker-compose: `$ docker-compose start jasperserver` - * For manual execution ([mount](#mount-persistent-folders-manually) the directories if needed): `docker run --name jasperserver bitnami/jasperserver:latest` + * For docker-compose: `$ docker-compose start jasperserver` + * For manual execution ([mount](#mount-persistent-folders-manually) the directories if needed): `docker run --name jasperserver bitnami/jasperserver:latest` # Configuration ## Environment variables @@ -172,7 +170,7 @@ application: * For manual execution add a `-e` option with each variable and value: ```bash - $ docker run -d -e JASPERSERVER_PASSWORD=my_password -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --network=jasperserver_network bitnami/jasperserver + $ docker run -d -e JASPERSERVER_PASSWORD=my_password -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --network=jasperserver_network bitnami/jasperserver ``` Available variables: @@ -223,11 +221,7 @@ To backup your application data follow these steps: 2. Copy the JasperReports data folder in the host: -```bash -$ docker cp /your/local/path/bitnami:/bitnami/jasperserver -``` -======= - ``` + ```bash $ docker cp /your/local/path/bitnami:/bitnami/jasperserver ``` # Restoring a backup From 4126183f83673164b480474f63989d2416b4455e Mon Sep 17 00:00:00 2001 From: raquel-campuzano Date: Wed, 23 Nov 2016 13:04:01 +0100 Subject: [PATCH 8/8] Replace network name, fix inconsistences --- bitnami/jasperreports/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bitnami/jasperreports/README.md b/bitnami/jasperreports/README.md index 4cffee6decdc..60db76d6fff3 100644 --- a/bitnami/jasperreports/README.md +++ b/bitnami/jasperreports/README.md @@ -40,8 +40,8 @@ volumes: jasperserver_data: driver: local ``` -Then you can access your application at http://your-ip/. Enter bitnami default username and password: -`user/ bitnami` +Then you can access your application at http://your-ip/. Enter bitnami default username and password: +`user/ bitnami` ## Run the application manually @@ -50,19 +50,19 @@ If you want to run the application manually instead of using docker-compose, the 1. Create a new network for the application: ```bash - $ docker network create jasperserver_network + $ docker network create jasperserver-tier ``` 2. Run the JasperReports container: ```bash - $ docker run -d -p 80:8080 --name jasperserver --net=jasperserver_network bitnami/jasperserver + $ docker run -d -p 80:8080 --name jasperserver --net=jasperserver-tier bitnami/jasperserver ``` -Then you can access your application at http://your-ip/. Enter bitnami default username and password: -`user/ bitnami` - ->**Note!** If you are using **Docker for Windows** (regardless of running the application using Docker compose or manually) you must check the Docker virtual machine IP executing this command: +Then you can access your application at http://your-ip/. Enter bitnami default username and password: +`user/ bitnami` + +>**Note!** If you are using **Docker for Windows** (regardless of running the application using Docker compose or manually) you must check the Docker virtual machine IP executing this command: `docker-machine ip` @@ -70,7 +70,7 @@ This IP address allowing you to access to your application. ## Persisting your application -If you remove every container and volume all your data will be lost, and the next time you run the image the application will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed. +If you remove every container and volume all your data will be lost, and the next time you run the image the application will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed. For persistence of the JasperReports deployment, the above examples define docker volumes namely `tomcat_data` and `jasperserver_data`. The JasperReports application state will persist as long as these volumes are not removed. @@ -86,7 +86,7 @@ version: '2' services: mariadb: bitnami/mariadb:latest volumes: - - mariadb_data:/bitnami/mariadb + - /path/to/mariadb-persistence:/bitnami/mariadb jasperserver: image: bitnami/jasperserver:latest depends_on: @@ -170,7 +170,7 @@ application: * For manual execution add a `-e` option with each variable and value: ```bash - $ docker run -d -e JASPERSERVER_PASSWORD=my_password -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --network=jasperserver_network bitnami/jasperserver + $ docker run -d -e JASPERSERVER_PASSWORD=my_password -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --network=jasperserver-tier bitnami/jasperserver ``` Available variables: @@ -208,7 +208,7 @@ This would be an example of SMTP configuration using a GMail account: * For manual execution: ```bash - $ docker run -d -e SMTP_HOST=smtp.gmail.com -e SMTP_PORT=587 -e SMTP_USER=your_email@gmail.com -e SMTP_PASSWORD=your_password -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --net=jasperserver_network bitnami/jasperserver + $ docker run -d -e SMTP_HOST=smtp.gmail.com -e SMTP_PORT=587 -e SMTP_USER=your_email@gmail.com -e SMTP_PASSWORD=your_password -p 80:8080 --name jasperserver -v /your/local/path/bitnami/jasperserver:/bitnami/jasperserver --net=jasperserver-tier bitnami/jasperserver ``` # Backing up your application