• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

MarcialRosales/maven-concourse-pipeline: Concourse Reference Pipeline to build M ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

MarcialRosales/maven-concourse-pipeline

开源软件地址(OpenSource Url):

https://github.com/MarcialRosales/maven-concourse-pipeline

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

maven-concourse-pipeline

The goal of this project is to build a Reference Concourse Pipeline for Java applications.

Credits

https://github.com/starkandwayne/concourse-tutorial.

Tutorial

We have built a step by step tutorial on how to build a standard Continuous Integration pipeline to build java applications. We will dedicate a branch to perform each step. This branch, the master, is dedicated to the chapter 00 where we set up Concourse and a git repository for the application we will build using the pipeline.

The current project contains concourse artifacts, i.e. pipeline, tasks and script files. It does not build any specific project.

If you want to follow this tutorial you will need the following directory layout:

concourse-tutorial
  |
  └-- maven-concourse-pipeline (clone from https://github.com/MarcialRosales/maven-concourse-pipeline/)
  └-- maven-concourse-pipeline-app1 (clone from your own repository)

00 - Set up repository for our sample application

  1. First create a folder
mkdir concourse-tutorial
cd concourse-tutorial
  1. Checkout master branch of this repository
concourse-tutorial$ git clone https://github.com/MarcialRosales/maven-concourse-pipeline
  1. Create a repository or fork https://github.com/MarcialRosales/maven-concourse-pipeline-app1 repo
  2. Checkout your repository
concourse-tutorial$ git clone https://github.com/<myaccount>/maven-concourse-pipeline-app1

00 - Set up Concourse

Launch Concourse with Docker-compose Access the folder maven-concourse-pipeline. From this folder, we are going to launch Concourse using Docker compose. This folder has a docker-compose.yml file and a keys folder with all the required ssh keys.

Make sure you have Docker and Docker compose installed.

To launch concourse we run docker-compose up which by default reads the file docker-compose.yml. On this file we have declared the 3 containers we need to run Concourse: the database, the web-server which gives us the nice Concourse front-end and the worker container where concourse executes the tasks.

Note: Running via docker-machine : If you are running concourse via docker-machine (not natively) make sure you set up the environment variable CONCOURSE_EXTERNAL_URL before running docker-compose up.

CONCOURSE_EXTERNAL_URL=`echo $DOCKER_HOST | sed s/tcp/http/ | sed s/2376/8080/` nohup docker-compose up

We can open the CONCOURSE_EXTERNAL_URL in our browser. The default credentials are concourse:changeme

Download fly Once we have Concourse running, we need to download a command line utility called fly from the main page of our Concourse.

Login to Concourse Before we operate with Concourse through fly we need to login and remember that login attempt with an alias. Every command we subsequently invoke must refer to that alias.

Let's login to Concourse running under http://192.168.99.100:8080 using username and password concourse:changeme and we give it the alias plan1:

fly -t plan1 login -c http://192.168.99.100:8080 -u concourse -p changeme

It is very likely that fly warns us with a message similar to this one:

fly version (2.2.1) is out of sync with the target (2.6.0). to sync up, run the following:

    fly -t plan1 sync

cowardly refusing to run due to significant version discrepancy

All we have to do is run the suggested command: fly -t plan1 sync and it will automatically upgrade our fly client.

Now, we are all set to continue.

Next chapters

01 - Compile & Verify

concourse-tutorial/maven-course-pipeline$ git checkout origin/01_build_and_verify

Pipeline

02 - Use corporate Maven Repository

concourse-tutorial/maven-course-pipeline$ git checkout origin/02_use_corporate_maven_repo

03 - Release Versioned Artifacts

concourse-tutorial/maven-course-pipeline$ git checkout origin/03_release_versioned_artifact

04 - Install Built Artifact to Maven Repo

concourse-tutorial/maven-course-pipeline$ git checkout origin/04_install_built_artifact

05 - Deploy, Verify and Promote Release candidate

concourse-tutorial/maven-course-pipeline$ git checkout origin/05_deploy_and_verify

Pipeline

06 - Deploy Surefire Reports

concourse-tutorial/maven-course-pipeline$ git checkout origin/06_deploy_surefire_reports

Pipeline

Next Installments

Feature branches and automatic branch tracking

Provision services (required by the application)

Push to production if acceptance tests pass

Provision the PCF runtime where to push our applications

Before we can push our application, we need to provision the necessary infrastructure. We need a PCF foundation identified by an URL, we also need an organization, a space and a user. That space/organization must be configured with certain physical prerequisites like amount of RAM, disk, etc.

This type of provisioning occurs before any application attempts to deploy itself. Furthermore, it is very likely that several applications will be deployed on the same runtime environment. To be more specifics, in terms of PCF, a runtime environment is a space within an organization within a PCF foundation. And we can go even further and assume that we could have many runtime environments for different line of business; we could have all the front-office applications running in one runtime environment and all the back-office apps in separate runtime environment. Some people use the term ecosystem to refer to a runtime environment. Sounds like a good name to me too. To summarize, applications are deployed to ecosystems which must be previously provisioned by someone...




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap