Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes required for Configuration As Code (and plugin install) #136

Closed
wants to merge 37 commits into from

Conversation

arranubels
Copy link
Contributor

@arranubels arranubels commented Oct 4, 2018

This was created as part of the project to deploy the jenkins stats and watcher plugins using ciinabox-ecs. As a result we have integrated Configuration As Code (CAC), which was unable to install the plugins so we needed a new plugin delivery system until CAC is able to deliver, there are several ways of loading plugins, read below to find out more!

Please review this in conjunction base2Services/ciinabox-containers#39

Notes:

  • This incorporates some other changes I made to make it easier for me, such as: Like watch, but with desktop notifications #126 and Should be bastion not nata #131
  • Review https://github.com/base2Services/ciinabox-cac-example for usage, some changes such as:
    selection_170
    Aren't in the the repo, as it will have to be replaced with a new value (I guess before being accepted?)
  • This depends on the ciinabox-containers pull request: Changes required for Configuration As Code (and plugin install)  ciinabox-containers#39
  • This supports several mechanisms for deploying plugins:
    • If you create a plugins.list, it will use the new jenkins installation method "install-plugin.sh"
    • If you specify plugins inside configuration as code's yml file's "Plugins" section, it will use Configuration as code to install. This is highly NOT recommended, I have tested it extensively, it's not ready for prime time. It also admits it on the repo's readme.md.
    • plugins.txt should still work using the old installation method, I don't recommend this.
    • installing plugins via a groovy script, I played around with this a lot, it leaves a lot to be desired, the requirement to reboot jenkins before it has fully started, along with an order of execution / concurrent start with configuration as code, which can do it's own plugins make it undesirable. (I have since made configuration as code install via install-plugins.sh
    • Including plugins (the actual HPI) in the "plugins" folder, this then calls "install-plugins-local.sh" in the /inits/ plugin installation location. This is specified by ciinabox-ecs in the :package_cac rake (sub)instruction.
  • Ciinabox-ecs generates a tar file in the :package_cac, which it then uploads to S3 in the :deploy step.. This tar file, is loaded into the jenkins container via the ENV SRCTAR, which then ciinabox-containers/jenkins/cac/entrypoint.sh downloads and overlays as the user jenkins. This is applied every time it starts intentionally as that seems to be what Configuration As Code seems to suggest is the right way.
  • Old configuration options for configuring cloudwatch and cloudstats will have to be removed:
    image
  • As per other pull requests, watch has been enhanced to make it more robust, exit the task when complete, and exit the process when it fails instead of regardless of status. Supports delete/tear_down. I've added a notify to it, for desktop notifications. (very useful.)
  • SSH rake task is more helpful
  • overlay.tar is responsible for installing the configuration as code file, intentionally. It acts as a docker layer in the sense with less overhead.
  • This can be used to deploy plugins without using Configuration as code. The plugin component should be stable. Just need to verify that install-plugin-local.sh works with each new jenkins version. (Monitor install-plugin.sh for changes.) Configuration as code however requires the new plugin install system at the moment. (It can be installed the previous way, but it has to do with Cloudstats and Cloudwatcher also needing to the installed. Plus the old way is depreciated.)

@Guslington
Copy link
Contributor

jcasc implemented in ciinabox 2

@Guslington Guslington closed this Sep 27, 2021
@aubelsb2
Copy link
Contributor

jwhat?

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