Skip to content

Commit

Permalink
docs(living_documentation) rework
Browse files Browse the repository at this point in the history
TODO:
 - add feature descriptions to illustrate bosh / TF / cf-apps/ concourse-pipeline pipelines
 - ensure all tests from spec/reference_dataset/reference_dataset_spec.rb are covered by cucumber feature, and then delete spec/reference_dataset/reference_dataset_spec.rb => credentials management is missing !

Done:
 - gem update
 - rework sample tf files
 - Lucas review
 - fix reference_dataset_documentation lib tests (Pipelines handles an output dir,...)
 - remove 'should' from feature
 - cucumber generated pipelines are in docs/reference_dataset/pipelines
 - add 'docs/reference_dataset/pipelines' cleanup, before running tests
 - updated reference_dataset_documentation lib to handle config dir without a root_deployment
 - cleanup gitignore
 - update readme
  • Loading branch information
lucaspinto authored and o-orand committed Jun 30, 2018
1 parent 7880a10 commit 0ff2d7d
Show file tree
Hide file tree
Showing 139 changed files with 4,467 additions and 1,629 deletions.
File renamed without changes.
10 changes: 1 addition & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
#**/secrets/*
#**/secrets.yml
#shared/
**/*-generated.yml
bootstrap-generated/**/*-generated.yml

### Eclipse template
.settings/
# Eclipse Core
.project

/ops-depls/cf-apps-deployments/mattermost/mattermost/
/ci/private*.yml
bin/
.bundle/
Expand All @@ -23,5 +17,3 @@ spec/tasks/git_reset_wip/**
/Readme.md.toc.*
/Readme.md.orig.*

reference_dataset_output_dir
features/generated_pipelines/reference_dataset_documentation_pipelines
28 changes: 15 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ GEM
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.0.5)
cucumber (3.1.0)
cucumber (3.1.1)
builder (>= 2.1.2)
cucumber-core (~> 3.1.0)
cucumber-expressions (~> 5.0.4)
cucumber-expressions (~> 6.0.0)
cucumber-wire (~> 0.0.1)
diff-lcs (~> 1.3)
gherkin (~> 5.0)
gherkin (~> 5.1.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (3.1.0)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (>= 5.0.0)
cucumber-expressions (5.0.18)
cucumber-expressions (6.0.1)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
deep_merge (1.2.1)
Expand All @@ -46,7 +46,7 @@ GEM
multipart-post (>= 1.2, < 3)
faraday-http-cache (2.0.0)
faraday (~> 0.8)
gherkin (5.0.0)
gherkin (5.1.0)
github_changelog_generator (1.14.3)
activesupport
faraday-http-cache
Expand All @@ -58,15 +58,16 @@ GEM
i18n (1.0.1)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jaro_winkler (1.5.1)
json (2.1.0)
kramdown (1.16.2)
kramdown (1.17.0)
mdl (0.4.0)
kramdown (~> 1.12, >= 1.12.0)
mixlib-cli (~> 1.7, >= 1.7.0)
mixlib-config (~> 2.2, >= 2.2.1)
minitest (5.11.3)
mixlib-cli (1.7.0)
mixlib-config (2.2.6)
mixlib-config (2.2.8)
tomlrb
multi_json (1.13.1)
multi_test (0.1.2)
Expand All @@ -76,7 +77,7 @@ GEM
parallel (1.12.1)
parser (2.5.1.0)
ast (~> 2.4.0)
powerpack (0.1.1)
powerpack (0.1.2)
public_suffix (3.0.2)
rainbow (3.0.0)
rake (12.2.1)
Expand All @@ -102,15 +103,16 @@ GEM
rspec-rerun (1.1.0)
rspec (~> 3.0)
rspec-support (3.7.1)
rubocop (0.56.0)
rubocop (0.57.2)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-rspec (1.25.1)
rubocop (>= 0.53.0)
rubocop-rspec (1.27.0)
rubocop (>= 0.56.0)
ruby-progressbar (1.9.0)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
Expand All @@ -121,10 +123,10 @@ GEM
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
thread_safe (0.3.6)
tomlrb (1.2.6)
tomlrb (1.2.7)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.3.2)
unicode-display_width (1.4.0)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
Expand Down
20 changes: 11 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* [bosh deployment](#bosh-deployment)
* [cf-app deployment](#cf-app-deployment)
* [shared and private configuration](#shared-and-private-configuration)
* ["paas-templates" and "secrets" repo structure examples](#paas-templates-and-secrets-repo-structure-examples)
* [COA development](#coa-development)
* [Status and roadmap](#status-and-roadmap)
* [Running the Test Suite](#running-the-test-suite)
Expand All @@ -69,7 +70,8 @@
* [Credits](#credits)
* [Changelog](#changelog)
* [Upgrade](#upgrade)
* [pre requisite](#pre-requisite-2)
* [pre requisite](#pre-requisite-2)


<!--te-->

Expand Down Expand Up @@ -322,8 +324,6 @@ In `deployment-dependencies.yml`, it is possible to:
deployment:
micro-bosh:
cli_version: v1
stemcells:
...
releases:
...
```
Expand All @@ -335,8 +335,6 @@ Following is a `deployment-dependencies.yml` sample (should be placed in the bos
---
deployment:
micro-bosh:
stemcells:
bosh-openstack-kvm-ubuntu-trusty-go_agent:
releases:
route-registrar-boshrelease:
base_location: https://bosh.io/d/github.com/
Expand Down Expand Up @@ -554,8 +552,6 @@ run `./init-template.sh`, and it creates empty placeholder.
---
deployment:
micro-bosh:
stemcells:
bosh-openstack-kvm-ubuntu-trusty-go_agent:
releases:
route-registrar-boshrelease:
base_location: https://bosh.io/d/github.com/
Expand Down Expand Up @@ -584,7 +580,7 @@ See [post-generate.sh](micro-depls/terraform-config/template/post-generate.sh) s

There is no yet public template sample. Orange employees can have a look to the [post-generate.sh](micro-depls/terraform-config/template/post-generate.sh) in the private paas-template repo.

## How to bootstrap pipelines to a new concourse
## How to bootstrap pipelines to a new concourse?

simply run [concourse-bootstrap.sh](scripts/concourse-bootstrap.sh) with the appropriate environment variable set. It loads the
`bootstrap-all-init-pipelines` pipeline and triggers it.
Expand All @@ -603,7 +599,7 @@ The following tools are required to run [concourse-bootstrap.sh](scripts/concour
* fly, the concourse CLI
* Login to concourse in main team

## How to create a new root deployment
## How to create a new root deployment?

To setup a new paas-template repo, a new secrets repo or to add a new root deployment, you can run
[create-root-depls](scripts/create-root-depls.rb) script to create empty files.
Expand All @@ -614,6 +610,12 @@ The following tools are required to run [create-root-depls](scripts/create-root-

* ruby

## How to manage stemcell?

The same stemcell is used for all deployments, it is defined in [shared-config.yml](docs/reference_dataset/template_repository/shared-config.yml)
or in [private-config.yml](docs/reference_dataset/config_repository/private-config.yml), but the version is managed by
`root-deployment` using dedicated [<root-deployment>-versions.yml](docs/reference_dataset/template_repository/hello-world-root-depls/hello-world-root-depls-versions.yml)

# Credits

This repo was inspired by great work shared in:
Expand Down
60 changes: 36 additions & 24 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ jobs:
- get: cf-ops-automation-test-secrets
trigger: true


- task: setup-pre-requisites
attempts: 1
image: cf-ops-automation-docker-image
Expand Down Expand Up @@ -278,35 +277,17 @@ jobs:
FLY_USERNAME: ((concourse-username))
FLY_PASSWORD: '((concourse-password))'


- name: merge-to-master
- name: update-documentation
serial: true
plan:
- aggregate:
- get: ci-master
- get: cf-ops-automation
resource: ci-develop
trigger: true
passed: [test]
- get: cf-ops-automation-docker-image
passed: [test]
- put: ci-master
params:
repository: cf-ops-automation

- name: ship-it
serial: true
serial_groups: [version]
plan:
- aggregate:
- get: version
params: {bump: final}
- get: cf-ops-automation
resource: ci-master
# trigger: true
passed: [merge-to-master]
# - get: cf-ops-automation-docker-image
# passed: [merge-to-master]
- task: generate-living-documentation
config:
platform: linux
Expand All @@ -316,7 +297,6 @@ jobs:
repository: orangecloudfoundry/cf-ops-automation
inputs:
- name: cf-ops-automation
- name: version
outputs:
- name: cf-ops-automation-living-documentation
run:
Expand All @@ -327,10 +307,12 @@ jobs:
git config --global user.email "$GIT_USER_EMAIL"
git config --global user.name "$GIT_USER_NAME"
RELEASE_VERSION=$(cat version/version)
RELEASE_VERSION=test
git clone cf-ops-automation cf-ops-automation-living-documentation
cd cf-ops-automation-living-documentation/
bundle exec cucumber
bundle exec cucumber -f html --out docs/features/features.html -f pretty --out docs/features/features.md -f pretty --no-color --no-source
gh-md-toc --insert Readme.md
cat Readme.md|grep -v 'Added by:' >tmp.md && mv tmp.md Readme.md
git add -A
CHANGE_DETECTED_COUNTER=$(git status --porcelain|wc -l)
if [ ${CHANGE_DETECTED_COUNTER} -gt 0 ]
Expand All @@ -342,10 +324,40 @@ jobs:
params:
GIT_USER_NAME: "Orange Cloud Foundry SKC CI Server"
GIT_USER_EMAIL: "codex.clara-cloud-ops@orange.com"
- put: ci-master
- put: ci-develop
params:
repository: cf-ops-automation-living-documentation
rebase: true


- name: merge-to-master
serial: true
plan:
- aggregate:
- get: ci-master
- get: cf-ops-automation
resource: ci-develop
trigger: true
passed: [update-documentation]
- get: cf-ops-automation-docker-image
passed: [update-documentation]
- put: ci-master
params:
repository: cf-ops-automation

- name: ship-it
serial: true
serial_groups: [version]
plan:
- aggregate:
- get: version
params: {bump: final}
- get: cf-ops-automation
resource: ci-master
# trigger: true
passed: [merge-to-master]
# - get: cf-ops-automation-docker-image
# passed: [merge-to-master]
- task: generate-changelog
config:
platform: linux
Expand Down
1 change: 0 additions & 1 deletion docs/_config.yml

This file was deleted.

1 change: 0 additions & 1 deletion docs/reference_dataset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ You can find a Hello World example descbribed in [cf-apps-sample-hello-world.md]
You can find a Hello World example descbribed in [concourse-sample-hello-world.md](concourse-sample-hello-world.md)

### Kubernetes

Loading

0 comments on commit 0ff2d7d

Please sign in to comment.