Skip to content

Commit

Permalink
fix(api): create worker model flag (#3922)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored and bnjjj committed Feb 11, 2019
1 parent c6f72e4 commit 36e87fb
Show file tree
Hide file tree
Showing 25 changed files with 262 additions and 84 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ A [hatchery](https://ovh.github.io/cds/hatchery/) is like an incubator, it gives

Several types of hatchery are available:

- **[hatchery kubernetes](https://ovh.github.io/cds/hatchery/kubernetes/)** (start workers in pods)
- **[hatchery openstack](https://ovh.github.io/cds/hatchery/openstack/)** (start virtual machines)
- **[hatchery swarm](https://ovh.github.io/cds/hatchery/swarm/)** (start docker containers)
- **[hatchery marathon](https://ovh.github.io/cds/hatchery/marathon/)** (starts docker containers)
- **[hatchery VSphere](https://ovh.github.io/cds/hatchery/vsphere/)** (start virtual machines)
- **[hatchery local](https://ovh.github.io/cds/hatchery/local/)** ( starts processes on a host).
- **[hatchery kubernetes](https://ovh.github.io/cds/hatchery/kubernetes/)** starts workers in pods
- **[hatchery openstack](https://ovh.github.io/cds/hatchery/openstack/)** starts virtual machines
- **[hatchery swarm](https://ovh.github.io/cds/hatchery/swarm/)** starts docker containers
- **[hatchery marathon](https://ovh.github.io/cds/hatchery/marathon/)** starts docker containers
- **[hatchery VSphere](https://ovh.github.io/cds/hatchery/vsphere/)** starts virtual machines
- **[hatchery local](https://ovh.github.io/cds/hatchery/local/)** starts processes on a host

So yes, buzzwords or not, a multi-cloud Auto-scale OnDemand is a reality with CDS :-)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version: v1.0
name: [[.name]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: [[.name]]-dev
values:
url:
type: string
value: http://dev.[[.name]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: v1.0
name: build-[[.id]]
stages:
- build
- package
jobs:
- job: build
stage: build
steps:
- script:
- echo "Building my application"
- job: package
stage: package
steps:
- script:
- echo "Packaging my application"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: [[.name]]-preprod
values:
url:
type: string
value: http://preprod.[[.name]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1.0
name: deploy-[[.id]]
stages:
- deploy
jobs:
- job: deploy
stage: deploy
steps:
- script:
- echo "Deploying my application at {{.cds.env.url}}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: [[.name]]-prod
values:
url:
type: string
value: http://prod.[[.name]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1.0
name: it-[[.id]]
stages:
- it
jobs:
- job: it
stage: it
steps:
- script:
- echo "Testing my application at {{.cds.env.url}}"
24 changes: 24 additions & 0 deletions contrib/workflow-templates/demo-workflow-hello-world/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Description

*This is a demo tempate*

The template will generates a Hello World workflow with usual steps:
- build and package
- deploy on development environment
- it test
- deploy on pre-production and production environments

It's the same as demo-workflow-skeleton workflow template, but does not contain dependency with a Git Repository Manager. So that, it's pretty
useful to discover CDS Workflow with the [Ready To Run](https://ovh.github.io/cds/hosting/ready-to-run/docker-compose/) without having a Git
repository manager attached.

# How to import it on your CDS Instance

This template is linked to group: `shared.infra`

If you want to import it, you have to be CDS Administrator on your CDS Instance.

``` bash
# import from github
cdsctl template push https://raw.githubusercontent.com/ovh/cds/master/contrib/workflow-templates/demo-workflow-hello-world/demo-workflow-hello-world.yml
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
slug: demo-workflow-hello-world
name: Demo workflow hello world
group: shared.infra
description: A template that generates a Hello World Workflow. It's the same as demo-workflow-skeleton, but does not contain dependency with a Git Repository Manager.
workflow: workflow.yml
pipelines:
- 1.pipeline.yml
- 2.pipeline.yml
- 3.pipeline.yml
applications:
- 1.application.yml
environments:
- 1.environment.yml
- 2.environment.yml
- 3.environment.yml
38 changes: 38 additions & 0 deletions contrib/workflow-templates/demo-workflow-hello-world/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: [[.name]]
version: v1.0
workflow:
build:
pipeline: build-[[.id]]
application: [[.name]]
deploy-dev:
pipeline: deploy-[[.id]]
application: [[.name]]
environment: [[.name]]-dev
depends_on:
- build
it-dev:
pipeline: it-[[.id]]
application: [[.name]]
environment: [[.name]]-dev
depends_on:
- deploy-dev
fork:
depends_on:
- it-dev
deploy-preprod:
pipeline: deploy-[[.id]]
application: [[.name]]
environment: [[.name]]-preprod
when:
- success
depends_on:
- fork
deploy-prod:
pipeline: deploy-[[.id]]
application: [[.name]]
environment: [[.name]]-prod
when:
- manual
- success
depends_on:
- fork
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ services:
- /tmp:/app/artifacts
environment:
CDS_API_DATABASE_HOST: cds-db
CDS_API_URL_API: ${HOSTNAME}:8081
CDS_API_URL_UI: ${HOSTNAME}:8080
CDS_API_URL_API: http://${HOSTNAME}:8081
CDS_API_URL_UI: http://${HOSTNAME}:2015
CDS_API_AUTH_DEFAULTGROUP: cdsdemo
CDS_LOG_LEVEL: debug
CDS_LOG_LEVEL: info
CDS_API_CACHE_MODE: redis
CDS_API_CACHE_REDIS_HOST: cds-cache:6379
CDS_API_CACHE_REDIS_PASSWORD: cds
Expand Down Expand Up @@ -79,7 +79,6 @@ services:
environment:
CDS_HATCHERY_SWARM_COMMONCONFIGURATION_NAME: hatchery-swarm
CDS_HATCHERY_SWARM_COMMONCONFIGURATION_API_TOKEN: changeitchangeitchangeitchangeitchangeitchangeitchangeitchangeit
# if you launch docker-compose on osx with socat, set 2376 insteand of 2375 below
DOCKER_HOST: tcp://${HOSTNAME}:2375
# CDS_LOG_LEVEL: debug
# DOCKER_HOST: unix://var/run/docker.sock
Expand Down
2 changes: 1 addition & 1 deletion docs/content/contribute/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See https://github.com/ovh/cds/blob/master/ROADMAP.md
* Benjamin COENEN - [@BnJ25](https://twitter.com/BnJ25)
* François SAMIN - [@francoissamin](https://twitter.com/francoissamin)
* Steven GUIHEUX - [@sguiheux](https://twitter.com/sguiheux)
* Richard LE TERRIER - [@richardlte](https://twitter.com/richardlte)
* Yvonnick ESNAULT - [@yesnault](https://twitter.com/yesnault)

A remark / question / suggestion, feel free to join us on https://gitter.im/ovh-cds/Lobby
Expand All @@ -22,4 +23,3 @@ All CDS Contributors: https://github.com/ovh/cds/graphs/contributors
## Found a bug?

Feel free to open an issue on https://github.com/ovh/cds/issues

0 comments on commit 36e87fb

Please sign in to comment.