Skip to content

Task/tailor for update templates - For review only#227

Closed
henrjk wants to merge 15 commits intoopendevstack:masterfrom
BIX-Digital:task/tailor-for-update-templates
Closed

Task/tailor for update templates - For review only#227
henrjk wants to merge 15 commits intoopendevstack:masterfrom
BIX-Digital:task/tailor-for-update-templates

Conversation

@henrjk
Copy link
Copy Markdown
Member

@henrjk henrjk commented Jun 13, 2019

For review only -- not quite ready to be merged yet

This implements the changes described in comment #38 (comment).

The code requires opendevstack/ods-jenkins-shared-library#91 so that the openshift folder generated is actually being processed with tailor during the jenkins build.

Besides this requirement the code is not ready to be pulled in as it currently has rundeck job copies for testing. This will have to be cleaned up before delivering.

opendevstack/ods-jenkins-shared-library#91 fixes some problems encountered with opendevstack/ods-jenkins-shared-library#85.

Please review!

Copy link
Copy Markdown
Member

@gerardcl gerardcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what a proposal! I will try to get some time a fully test it and also go through the code carefully! but as far as I've understood this is something I would agree on having/happening! 👍

}

library identifier: 'ods-library@production', retriever: modernSCM(
library identifier: 'ods-library@feature/tailor-deploy-debug', retriever: modernSCM(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henrjk I would recommend the identifier to match this PR source branch name, or to point to production. Anyway, as you already mentioned, if the purpose of this PR is only for researching and proposing yet it is fine for me!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I wanted to remove this change (so that it would be production) once the fix (or something equivalent) in branch feature/tailor-deploy-debug is merged.

@michaelsauter
Copy link
Copy Markdown
Contributor

  • Unify multiple yml into one
  • Remove references to PR branch
  • Ensure all params are present in configuration sample

@henrjk
Copy link
Copy Markdown
Member Author

henrjk commented Jun 27, 2019

I updated the PR with

  • Unify multiple yml into one
  • Remove references to PR branch

This has been tested in production with the mentioned PR branch of the shared library. It should be retested with the final version of the shared library

Also before this can be merged (after additional review) I will still need to:

  • Ensure all params are present in configuration sample.

I will leave another comment when I am done.

I discussed the PR with @gerardcl and @hugowschneider. Based on their feedback I changed the way the openshift folder is generated so it is easier to customize. See comments in

# Generates default openshift setup for tailor .

Other things we talked about which I do not want to pursue in this issue were:

  • Could the openshift folder be used for migration and would bring advantages compared to the current approach with occonfig_artifacts?
  • Since the delete-component.sh scripts have been removed, give instructions in the component creation output on how to delete the generated component based on the app label.
  • Should tailor use the --upsert-only switch when updating based on the openshift folder (perhaps only for the initial update)?
    And some more stylistic changes:
  • Combine several consecutive script executions in rundeck jobs into a single script. However we are not sure whether this work would carry forward once we move away from rundeck.
  • Also use script instead of exec everywhere in the rundeck script. I would like to do this separately or postpone as it will require retesting all changed scripts.

henrjk added 14 commits June 27, 2019 16:39
Change summary:

- Use yml format allowing exec with multiple lines in code.
- Old templates were left untouched (to be removed later)
- New templates are in ocp_templates/ocp-config/ and
  configuration in
  ods-configuration/ods-project-quickstarters/ocp-config and
  ods-configuration/ods-project-quickstarters/templates
- Made sure that ocp-templates/Dockerfile assume same layout as
  on local file system.
- Rundeck to setup dockerbuild context.
- Provide rundeck jobs for testing ending in <original-name>-qs-38.yaml
- Improved consistency of rshiny label usage.
  This allows better specificity of tailor commands.
- Remove namespace entries in templates which appear to not
  be needed.

Scripts in ocp-templates/scripts:
- create-projects.sh exits when invoked with unknown parameter
- Some scripts support a -d|--debug flag which causes
  -v to be used in tailor invocations.
- Some scripts support a --status command so that tailor status is used.
- Simplified delete-component script using selectors.
- Extract portion of create-projects.sh into create-cd-jenkins.sh for
  easier testability.
- Better output log message.
- delete-rshiny-app.sh: add message to user explaining and showing
  shared resources which are not deleted.
…ed project.

Requires opendevstack/ods-jenkins-shared-library#85

replace upload-templates.sh with tailor opendevstack#38

Change summary:

- Use yml format allowing exec with multiple lines in code.
- New templates are in ocp_templates/ocp-config/ and
  configuration in
  ods-configuration/ods-project-quickstarters/templates
- Provide rundeck jobs for testing ending in <original-name>-qs-38.yaml
- Improved consistency of rshiny label usage.
  This allows better specificity of tailor commands.
- Remove namespace entries in templates which appear to not
  be needed.

Scripts in ocp-templates/scripts:
- create-projects.sh exits when invoked with unknown parameter
- Some scripts support a -d|--debug flag which causes
  -v to be used in tailor invocations.
- Some scripts support a --status command so that tailor status is used.
- Extract portion of create-projects.sh into create-cd-jenkins.sh for
  easier testability.
- Better output log message.
labels:
 app: '${PROJECT}-${COMPONENT}'
with label template to distinguish individual parts.
debugging: use shared library feature/tailor-deploy-debug
remove unused bc-docker and use TAGVERSION in component-environment/bc.yml
rshiny-app: avoid that render*.sh scripts end up in generated bitbucket repo

undo move of rshiny-app Jenkinsfile and README.md

another attempt with rshiny-app readme.
adjustments in rundeck jobsrshiny-app more files reorg
@henrjk henrjk force-pushed the task/tailor-for-update-templates branch from 955f6c6 to d374298 Compare June 27, 2019 14:59
henrjk added a commit to BIX-Digital/ods-configuration-sample that referenced this pull request Jun 27, 2019
This if for Task/tailor for update templates -  Pull Request #227  in
opendevstack/ods-project-quickstarters
see opendevstack/ods-project-quickstarters#227
@henrjk
Copy link
Copy Markdown
Member Author

henrjk commented Jun 27, 2019

I consider this now complete.

@henrjk henrjk closed this Aug 27, 2019
@henrjk henrjk deleted the task/tailor-for-update-templates branch August 27, 2019 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants