Giter VIP home page Giter VIP logo

spring-attic / spring-cloud-pipelines Goto Github PK

View Code? Open in Web Editor NEW
235.0 23.0 175.0 33.62 MB

[DEPRECATED] Codebase containing Concourse and Jenkins opinionated pipelines. Moved to https://github.com/CloudPipelines/

Home Page: https://github.com/CloudPipelines/

License: Apache License 2.0

Shell 43.08% Groovy 30.07% HTML 2.72% CSS 4.55% JavaScript 18.98% Ruby 0.26% Dockerfile 0.34%
spring-cloud-core

spring-cloud-pipelines's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-cloud-pipelines's Issues

Summarize the gaps and challenges with Concourse pipeline

As a Spring user, I'd like to understand the current gaps and challenges leveraging the concourse pipeline for PCF deployments.

Acceptance:

  • It would be ideal for me to review the list of pros/cons
  • I'd also be interested in any known gaps and workarounds to make a spring-cloud project work seamlessly
  • Any other general concerns and/or feature requirements that we need to bring it up with the Concourse team

Jenkins Pipeline Downloads Non-existant Artifacts From Artifactory

I have run into some scenarios (due to my own mistakes) where the Jenkins pipeline will try to download artifacts from Artifactory that do not exist. Artifactory responds to these requests with some JSON response that has a 404 message in it. However the scripts will then try to deploy these "jars" to CF but then CF fails to start them. The end result is a very misleading error message from CF. It would be nice if we could inspect what is saved when pulling Jars from Artifactory to make sure it is not a 404 JSON response.

Introduce "Spinnaker-compatible" as an option for deployment

By adding a few details to the CF deployment phase, it's possible that apps deployed from a Concourse pipeline would be visible as proper "server groups" inside a Spinnaker installation monitoring the same space.

Env Variables

screen shot 2016-09-26 at 10 39 30 am

This screenshot shows full complement of variables, that when set, makes a server group visible to Spinnaker.

  • SPINNAKER_LOAD_BALANCERS is the name of the route from which the CF app would be visible, i.e. it's public URL (minus the domain). This is required.

However, just about everything else is optional, and provides extra information, but isn't needed for the app to be visible to Spinnaker (though if avaiable, let's populate!)

App name

The other thing needed to make the CF app visible to Spinnaker as a "server group" is the actual name of the application. There is a precise format that must be followed or it doesn't work.

While it might be old habit to name some demo pushed to CF spring-a-gram-demo-for-jug, Spinnaker has a library to enforce a format that looks like this => springagram-dev-demo-for-jug-v023.

The app name is split up by -'s, and tokenized as follows:

  • springagram - app name. Think of github repo where the code comes from. Or if you have a set of microservices that work together, this could be common element between all of them.
  • dev - stack. It's a logical label, often using things like "dev", "staging", "production", "gh123". This can also be how you distinguish a suite of microservices running in staging vs. the same stuff in production.
  • demo-for-jug - details. A free form where you can put anything, even dashes. When you have a set of microservices, it's great for describing each one, e.g. "circuit-breaker", "service-discovery", "email-service", "frontend", etc.
  • v023 - version. The last piece which denotes the exact version. Has to start with "v", and has to contain exactly three digits. Instead of "blue" and "green", they simply bump up the number and NEVER update an existing CF app, but instead push out a newer copy. For an out-of-the-box pipeline, we merely need to start with "v000".

NOTE: None of this dictates what org/space an app is deployed into.

Issues with this

  1. This can introduce complexity. That's why I'm leaning toward making it an option. The extra metadata and formatting of the app can add confusion we don't want if the user doesn't intend to use Spinnaker.
  2. If someone starts without Spinnaker-compatible, they can't expect to convert already deployed stuff into Spinnaker-compatible.
  3. It also introduces a wrinkle if you intend to support blue/green deployments. Blue/green deployments that are Spinnaker-compatible would require a poor man's version of what Spinnaker does. When pushing, instead of finding the inactive side and updating it, instead find the latest, bump up the version by 1, and push things out, then move the route. Issues arise when you see potential roll over scenarios, e.g. v999 and v000 currently deployed.

Unable to create /usr/share/jenkins/gituser

I was just trying to run through the documentation and try out the jenkins version of the demo and ran into this problem when trying to run

./start.sh gitUser gitPass gitOrg

Obviously with my real credentials and what not in there and got this error during starting up the containers via docker-compose

/bin/sh: 1: cannot create /usr/share/jenkins/gituser: Permission denied
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c printf "%s" "${gituser}" > /usr/share/jenkins/gituser' returned a non-zero code: 2

Looking into the Dockerfile I added my credentials there as well (that's a documentation miss I think)

Tried again, same error, which isn't shocking because my change has nothing to do with permissions.

Using ROOT that error disappears, and the credentials appear in jenkins (which I think is all that's doing there) so it seems like a viable solution.

I'm using Mac OS X El Capitan, Docker for Mac 1.12.1, and Virtual Box 5.1.8

Add more introduction

Describe rationale behind each step of the opinionated pipeline. Talk about configuration options.

Add support for Minikube for Jenkins

Work is started here - https://github.com/spring-cloud-samples/github-webhook/tree/kubernetes
Templating scripts - https://gist.github.com/marcingrzejszczak/6941e89e6f5a9fe2e69091345aada936

  • template the deployment script
  • template the service script
  • build docker images for eurekas
  • build docker images for stub runner boot
  • setup deployment configurations in sc-pipelines-repo for stub runner boot
  • build docker images for mysql
  • setup deployment configurations in sc-pipelines-repo for mysql
  • build docker images for rabbit
  • setup deployment configurations in sc-pipelines-repo for rabbit
  • ensure that the application & stub runner boot are services (the rest can be a deployment)
  • update Jenkins tests to use PersistentVolume & VolumeChain together with a Pod for test steps

K8 deployment scripts for Maven

  • ./mvnw clean deploy docker:build -DpushImageTag

Error when starting up artifactory docker container

@marcingrzejszczak - @malston and I saw this error when executing start.sh script to spin up the jenkins/artifactory:

Successfully tagged jenkins_jenkins:latest
Pulling artifactory (jfrog-docker-registry.bintray.io/artifactory/artifactory-oss:latest)...
ERROR: unauthorized: Repository '/jfrog/registry' does not support Docker API version v2

We got past it by using the docker.bintray.io/jfrog/ docker registry, but had to create the maven repo(lib-releases) ourselves.

Using docker-compose version 1.14.0, Docker version 17.06.0-ce

Add a step to run producer tests against the contracts from production deployment of the prodcer

Let's assume that version v1 for com.example:foo got deployed to production. In the stubs jar we have packed the groovy contracts for the foo service.

Now we run the new pipeline - v2. We can check backward compatibility of the API by running the contract tests again but by picking the contracts from the v1 jar. We can easily do that with the contracts jar dependency and by providing a path to the contracts.

Introduce Spinnaker pipelines

Create "Deploy to staging" and "Deploy to production" pipelines.

Deploy to staging should:

  • Depend on a Jenkins build job for a trigger
  • Leverage a Jenkins smoke test job
  • Deploy using highlander strategy, presuming staging resources should be kept to a minimum.

Deploy to production should:

  • Depend on deploy to staging pipeline as a trigger
  • Use Find Image for artifact discovery, finding the newest server group
  • Deploy using a red/black strategy with 2 server groups.

These jobs should presume user configures Spinnaker for a single CF space.

Automate project customization

Under this issue please comment on what you had to manually customize in the project so that it suit the needs for your company.

  • I don't want to use CF (#61)
  • Remove all the stage / prod Eureka / MySQL / Rabbit installations - move them to a script that should be executed before running the pipeline
  • Add customization of settings.xml / gradle.properties
  • Create a CLI to remove unnecessary parts of code

Getting an error when running "update-m2" step

Hi, I am likely missing some step - for some reason I am getting the following exception when running the update-m2 step in the concourse pipeline. Does anything jump out on what I may be missing here.

Root folder is [/tmp/build/0a57e892]
Repo resource folder is [repo]
Tools resource folder is [tools]
Version resource folder is [version]
tools/concourse/tasks/cache-m2.sh: 14: tools/concourse/tasks/cache-m2.sh: source: not found
Changing the maven local to [/tmp/build/0a57e892/]
tools/concourse/tasks/cache-m2.sh: 20: [: unexpected operator
tools/concourse/tasks/cache-m2.sh: 25: tools/concourse/tasks/cache-m2.sh: ./mvnw: not found

Allow reading of env vars from a repo

After cloning a project we could read some particular environment variables for that project. That way the pipeline can remain the same but it can try to read env vars from a file by convention e.g. sc-pipelines.properties

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.