This is a docker in docker with java 8 installed on it.
10K+
What is this repository? This is an open source project to create a continuous integration pipeline for building, testing and deploying a microservices application in a continuous integration environment.
Objective
Notes This section describes some design principles and decisions.
Notes for the future
###1.Create a directory for your project and enter into it
$ mkdir project_name
$ cd project_name
###2.Create your microservice application with jhipster.
How to create a jhipster application: http://jhipster.github.io/creating-an-app/
jhipster Microservices Architecure details: http://jhipster.github.io/microservices-architecture/
At this stage you should have two applications in your project, each one with its own folder "/project_name/gateway_app_name & /project_name/microservice_app_name"
Remembrer to modify gateway_app pom.xml (adding '--allow-root' to bower install)
<execution>
<id>bower install</id>
<goals>
<goal>bower</goal>
</goals>
<configuration>
<arguments>install --no-color --allow-root</arguments>
</configuration>
</execution>
###3.Download the .gitlab-ci.yml in your /project_name folder.
###4.Create your Gitlab project and activate the ci and the docker repository.
Now you create a project in gitlab.com and go to project settings to activate the shared runners and container registry.
Configure your CI: http://docs.gitlab.com/ce/ci/quick_start/README.html
"For a quick start you can use shared runners, but please read the security considerations of using shared runners in the link above"
Docker dind it is not supported in shared runners so the deploy step will fail
Find details of how to create and register shared runners with docker in docker i the URL below
Create Specific runners (This allows you to create your own runners with docker in docker support) http://docs.gitlab.com/ce/ci/runners/README.html
Activate container registry: http://about.gitlab.com/2016/05/23/gitlab-container-registry/
###5.Edit the .gitlab-ci.yml to configure your build
variables:
JHIPSTER_GATEWAY_APP: "gateway_application_name"
JHIPSTER_MICROSERVICE_APP: "microservice_application_name"
GITLAB_GROUP: "group"
GITLAB_PROJECT: "project"
GITLAB_GROUP & GITLAB_PROJECT are your gitlab username and project name
###6.Push your code to the repository
Go for one of your favorite drinks, it takes around 10 minutes to run your ci pipeline with an small jhipster project.
After 10 minutes...
Login into gitlab.com.
Select your project.
Go to Pipelines menu and see your build details, and your artifacts (application war files)
Go to Container Registry menu and see your containers. (docker containers)
Enjoy!
Infrestructure as code
Create a folder within the project with the docker-compose name or something similar and enter into it.
$ mkdir docker_compose
$ cd docker_compose
Then execute
$ yo jhipster:docker-compose
This will create all the needed files to bring the application up and running. "Find more details about docker-compose with jhipster in http://jhipster.github.io/docker-compose/ "
Now update the images sources of the docker-compose.yml file to point to your gitlab docker repository.
services:
application_name:
image: registry.gitlab.com/GITLAB_USER/PROJECT_NAME:APPLICATION_NAME
"Note you have to do it for both gateway and microservices application"
Content type
Image
Digest
Size
80.5 MB
Last updated
over 10 years ago
docker pull ogomez/java-docker