rh-openstack-ci-team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# promoter tests ###### tags: promoter design https://tree.taiga.io/project/tripleo-ci-board/us/1705?milestone=264741 ## WIP - [ ] move provision package install to a separate file: install_packages.yml - [ ] make repository ci-config clone from (zuul or local), never from github (avoid overwriting) - [ ] keep in main only provision parts - [ ] log setup - [ ] service setup - [ ] credentials - [ ] ci-config repo - [ ] Create python3 versions of staging jobs - [ ] staging-single - [ ] staging-integration - [ ] move/copy legacy/staging.yml to a private role _ensure_staging ## TO-DO - [ ] Make promoter provisioning role idempotent - [ ] create new mol-promote-images py3 job - [ ] nv job - [ ] test_sequence: prepare, converge, verify, cleanup - [ ] create new mol-container-push py3 job - [ ] nv job - [ ] test_sequence: prepare, converge, verify, cleanup - [ ] create new mol-tripleo-common-integration py3 job - [ ] nv job - [ ] test_sequence: prepare, converge, verify, cleanup - [ ] bootstrap mol jobs - [ ] make mol jobs voting - [ ] Implement cleanup/teardown for mol-promoter - [ ] promoter role code reorg and cleanup - [ ] remove unnecessary bits - [ ] sanitize code - [ ] Reuse ensure-docker from zuul-roles ## mol promoter - done - [x] ~~simplify credentials handling (expect keys on user home dir, not root) (MERGED)~~ - [x] ~~https://review.rdoproject.org/r/28655 New _ensure_credentials (MERGED)~~ - [x] ~~https://review.rdoproject.org/r/28656 Use _ensure_credentials in mol-promoter and staging jobs (not yet in all molecule scenarios) (MERGED)~~ - [x] ~~https://review.rdoproject.org/r/28683 Run molecule scenarios on promoter changes (MERGED)~~ - [x] ~~https://review.rdoproject.org/r/#/c/28623/ move provision/staging to py3 (MERGED)~~ - [x] ~~https://review.rdoproject.org/r/28597 Move mol-promoter to python3 (MERGED)~~ - [x] ~~https://review.rdoproject.org/r/28587 switch mol-promoter job to voting (MERGED)~~ - [x] ~~https://review.rdoproject.org/r/28553 Run mol-promoter as unprivileged user (MERGED)~~ - [x] ~~https://review.rdoproject.org/r/28552 Split promoter scenario test_sequence (MERGED)~~ --- ## Isolate legacy code - done * [x] ~~(RFOLCO) rename all current jobs and playbooks to legacy-*~~ 1. ~~https://review.rdoproject.org/r/28353 >> Move existing molecule playbooks to legacy dir (MERGED)~~ 1. ~~https://review.rdoproject.org/r/28355 >> Rename molecule-post to mol/post.yml (MERGED)~~ :::info ~~NOTE: The original idea was to rename the jobs, but since we are creating new mol jobs, we just move the legacy playbooks to a legacy/ dir and don; t touch the current molecule files (except the promoter proviosion one that was moved to molecule/promoter as it wasn't running in any job, so nothing has been affected by this move). For the other scenarios, new molecule files need to be created, so we don't touch the old legacy ones.~~ abandoned: ~~https://review.rdoproject.org/r/#/c/28293/ >> rename to legacy~~ ~~https://review.rdoproject.org/r/#/c/28294/ >> update rdo-jobs~~ ~~https://review.rdoproject.org/r/#/c/28295/ >> delete original names~~ ::: ## Initial design discussions (use as reference) * (RFOLCO + SORIN) Refactor/Fix promoter scenario * (RFOLCO + SORIN) Create new empty jobs for the modularized tests. * add description to the job * (SORIN) create provision playbook that works on centos7.8 with the current duplicated code * [create test jobs for provisioner role](https://review.rdoproject.org/r/#/c/28289/) on centos 7.8 (local and zuul) - leave the legacy centos7 alone, don't touch them anymore, they will become read only as much as possible. * the provisioner role should be idempotent. (Continuous Deployment) * (FOLCO) Deduplicate code in provisioner role to make organization more efficient. * De-dup: https://hackmd.io/kJqHSTWWRMOIfIhvDMGFLg#Code-Deduplication * consider putting all the scenarios in the same directory * clone the existing job to new job that will contain unduplicated code. * copy code from provisioner legacy code into smaller task files * create a main.yaml that includes all them in right order * Make provisioner centos7.8 with modularized code job stable and voting * Convert the delegated of the jobs to work with modularized code * convert promote-images-delegated * convert container-push-delegated * convert tripleo-common-integration and re-add tripleo-common test parts removed due to py3 deps missing. * add correct triggers files to zuul layout centos7.8 jobs * remove legacy centos7 job with duplicated code. * Make promoter integration centos7.8 with unduplicated code job stable and voting * Fix staging-single-pipeline job * fix staging-integration-pipeline job * (PANDA) create configuration engine that works accross all promotion environment ## LATER: DO * allow delegated scenarios to work on hosts other than localhost - [not...easy](it makes local testing possible) * create provision playbook that works on centos8 * create test jobs for centos 8 (leave centos7 jobs alone) * make current provisione code legacy: * ~~1 option : mv main.yaml -> main-legacy.yaml, update current job to use main-legacy.yaml~~ * 2 option clone promoter role into a new promoter-new role * copy code from provisioner legacy code into smaller task files * create a main.yaml that includes all them in right order * Make provisioner centos8 job stable and voting * Make promoter integration centos8 job stable and voting * Fix staging-single-pipeline job * fix staging-integration-pipeline job * Convert the rest of the jobs to work on centos8 * convert provision-delegate to centos8 * convert promote-images-delegated to centos8 * convert container-push-delegated to centos8 * convert tripleo-common-integration to cetnos8 * add correct triggers files to zuul layout centos8 jobs * remove legacy centos7 ## LATER: Investigate * deploy credentials * making ci-config code deployment idempotent * create configuration engine that works accross all promotion environment ## SOMETIME: Things to consider * Why not running promoter as a zuul periodic job? (internal zuul needed for internal promoter) ## NEVER: Things to avoid --- ## Code Deduplication :::info ***Summary of changes*** * Create new empty molecule jobs to replace legacy ones * start from simpler to harder * promote-images * container-push * tripleo-common * staging * make non-voting (its ok to fail) * small steps, iterate, fix next step, merge * make all molecule run with tox * follow mol standard: https://github.com/rdo-infra/ci-config/blob/master/zuul.d/jobs-mol.yaml * consolidate playbooks into a single one * molecule-*.yml >> mol-pre.yml * remove dups * * break scenarios into separate files * converge.yml -> prepare/converge/verify/cleanup * create private roles to include in prepare.yml so the molecule local test can run everything outside of zuul * inject credential tasks: _ensure_keys * docker setup: _ensure_docker * separate common parts of staging.yml * credentials * reuse common code * remove all legacy code ::: ### Job level: playbooks >BEFORE * molecule-delegated-pre.yml * install packages * configure docker-ce repo * install epel * remove existing docker * install docker-ce * start docker * setup docker user/group * reset connection * setup test-python virtualenv * install python-tripleoclient from zuul src * install tripleo-common from zuul src * molecule-delegated-promote-images-pre.yml * install epel * install packages * setup test-python virtualenv * check if pub key exists * create pub key otherwise * check if pub key is in authorized_keys * add pub key to authorized_keys otherwise * molecule-delegated.yml * source virtualenv * run molecule command in a shell task * staging.yml (end-to-end promotion integration test) * override role defaults (credentials and vars) * set dlrnapi password * stat docker config.json * set regstry password * save uploader key * include setup_loop from promoter role * include promoter role * include update_credentials from promoter role * add uploader pub key to authorized_keys * include setup_staging task from promoter role * include promotion_run from promoter role * gather stage info * fetch stage info into zuul executor * test stage promotion * check passwords are not leaked in the logs * check stage registry password is not leaked >AFTER :::warning * molecule-pre.yml * install packages * install epel * setup ~~test-python~~ **promoter_venv?** virtualenv Keep in the job's pre playbook ONLY what is common to all molecule jobs. ::: :::danger * ~~molecule-delegated.yml~~ * ~~delegated scenarios are converted to non-delegated~~ * ~~all molecule scenarios are executed by tox~~ * ~~no need to specify command in run playbook~~ * ~~molecule-delegated-promote-images-pre.yml~~ * ~~DUP: content absorved by other parts~~ ::: :::success * (create a new) credentials.yml * set dlrnapi password * stat docker config.json * set regstry password * save uploader key ::: :::warning * staging.yml (end-to-end promotion integration test) * override role defaults (credentials and vars) * **include credentials.yml** * include setup_loop from promoter role * include promoter role * include update_credentials from promoter role * add uploader pub key to authorized_keys * include setup_staging task from promoter role * include promotion_run from promoter role * gather stage info * fetch stage info into zuul executor * test stage promotion * check passwords are not leaked in the logs * check stage registry password is not leaked ::: >BEFORE ```graphviz digraph hierarchy { nodesep=1.5 node [color=Red,fontname=Courier,shape=box] edge [color=Blue, style=dashed] "scenarios"->{"default" "staging" "container push" "tripleo-common" "promote images"} "staging"-> { "staging.yml" } "staging.yml"-> {"staging-post.yml"} "container push"->{ "molecule-delegated-pre.yml" } "molecule-delegated-pre.yml"->{ "molecule-delegated.yml" } "molecule-delegated.yml"->{"molecule-post.yml"} "tripleo-common"->{ "molecule-delegated-pre.yml" } "promote images"->{ "molecule-delegated-promote-images.yml"} "molecule-delegated-promote-images.yml"->{"molecule-delegated.yml"} } ``` >AFTER ```graphviz digraph hierarchy { nodesep=1.5 node [color=Green,fontname=Courier,shape=box] edge [color=Black, style=dashed] "scenarios"->{"functional" "staging" "container push" "tripleo-common" "promote images"} "staging"-> { "staging.yml" } "staging.yml"-> {"staging-post.yml"} "container push"->{ "molecule-pre.yml" } "tripleo-common"->{ "molecule-pre.yml" } "promote images"->{ "molecule-pre.yml"} } ``` ### molecule-level: scenarios https://github.com/rdo-infra/ci-config/tree/master/ci-scripts/infra-setup/roles/promoter/molecule >BEFORE ``` ├── molecule │ ├── container-push │ │ ├── converge.yml │ ├── default │ │ ├── prepare.yml │ │ ├── converge.yml │ │ ├── functional_tests.yml │ ├── promote-images │ │ ├── converge.yml │ ├── tripleo-common-integration │ │ ├── converge.yml │ + + ``` >AFTER ``` ├── molecule │ ├── container_push │ │ ├── prepare.yml │ │ ├── converge.yml │ │ ├── verify.yml │ │ ├── cleanup.yml │ ├── promoter_provision │ │ ├── prepare.yml │ │ ├── converge.yml │ │ ├── (functional_tests.yml) │ │ ├── verify.yml │ │ ├── cleanup.yml │ ├── promote_images │ │ ├── prepare.yml │ │ ├── converge.yml │ │ ├── verify.yml │ │ ├── cleanup.yml │ ├── tripleo_common_integration │ │ ├── prepare.yml │ │ ├── converge.yml │ │ ├── verify.yml │ │ ├── cleanup.yml │ + + ``` :::success Add this private role to setup docker-ce for all container scenarios * _ensure_docker role * configure docker-ce repo * remove existing docker * install docker-ce * start docker * setup docker user/group * reset connection * install python-tripleoclient from zuul src * install tripleo-common from zuul src ::: #### container-push Split into separate scenarios: scenario 1: disable target registry push scenario 2: secure registry, manifest disabled scenario 3: insecure registry, multiarch manifests scenario 4: insecure registry, multiarch, ppc disabled :::warning * container-push * prepare.yml * include-role _ensure_docker * setup experimental docker * enable experimental docker * launch staging setup * include stage setup vars * set full_hash var * converge.yml * include containers-promote role * verify.yml 1. disable target registry push * manifest inspect * assert containers pushed to src registry only 1. secure registry, manifest disabled * manifest inspect registries 3. insecure registry, multiarch manifests * manifest inspect * get list of local images * assert all images have been pushed to registries * list files in manifest dir * assert no manifest leftovers 5. insecure registry, multiarch, ppc disabled * manifest inspect (excludes ppc) * get list of local images * assert all images have been pushed to registries * list files in manifest dir * assert no manifest leftovers * cleanup.yml * teardown ::: #### promote-images :::warning * promote-images * prepare.yml * setup public key >> moved from molecule-delegated-promote-images-pre.yml * launch staging setup * include stage vars * set full_hash * converge.yml * call promote-images shell script * verify.yml * get link promoted * check if link promoted exists and points to hash * get previous link * check if previous link points to initial hash * cleanup.yml * teardown ::: #### tripleo-common-integration :::warning * tripleo-common-integration * prepare.yml * include setup-docker.yml * pull registry image * run registry * include stage vars * set full_hash * generate containers template file * populate template w/ staging containers * generate prepare-parameter.yaml file * copy overcloud_containers.yaml * converge.yml * run container image prepare * verify.yml * check containers in undercloud_registry * inspect manifests in undercloud_registry * pull containers from undercloud_regstry * cleanup.yml * remove staging files * remove local containers * stop and remove registries ::: #### ~~default~~ promoter_provision :::warning * ~~default~~ promoter * prepare.yml * install development tools * ~~converge.yml~~ * load role defaults * set ci-config path * set vars for molecule env * stat local registry secrets file * inject registry password * inject dlrnapi password * save uploader key * converge.yml * run promoter role * include setup_loop task * include staging provisioning tasks (tag) * include update credentials task * install test-requirements in venv * verify.yml * functional tests * ~~setup staging~~ can be removed ?????? * ~~(not implemented) check if setup is ok~~ * cleanup.yml * teardown :::

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully