openshift-evangelists / oc-cluster-wrapper

oc cluster up bash wrapper
Apache License 2.0
144 stars 72 forks source link

plugin to enable tech-preview features #23

Closed jorgemoralespou closed 7 years ago

jorgemoralespou commented 8 years ago

Like the pipelines.

This can have dependency on #20 or be created now and then moved into a plugin

bjartek commented 8 years ago

So for refrence this is what we want to do right?

https://docs.openshift.org/latest/install_config/web_console_customization.html#web-console-enable-tech-preview-feature

Just create a js file and insert it into the configuration. I guess we also need to change the jenkins configuration a little.

Can we do this on a running cluster? How can we restart the cluster to have this work out?

jorgemoralespou commented 8 years ago

RIght, we need to set this up as a plugin, so I would rather have #20 done first.

I'm also still investigating if there's a way to restart just the origin container and not the whole cluster. I'm discussing this with main engineer in charge of "oc clsuter". For now full cluster down and up is required.

Also, some changes in next release will make this easier, since cluster initialization will not happen on second run (like creating the user and the project).

bjartek commented 8 years ago

So i played around with this today.

Given that this script is run inside a maser/config file it will do the trick

sed -i 's/  extensionScripts: null/  extensionScripts:\
    - pipelines.js/g' master-config.yaml

sed -i 's/autoProvisionEnabled: false/autoProvisionEnabled: true/g' master-config.yaml

echo "window.OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.pipelines = true;" >> pipelines.js
jorgemoralespou commented 8 years ago

It doesn't work for me on mac, but I didn't have time to validate the commands. But initilly the code looks good, although the sed like that is too dangerously complex ;-)

jorgemoralespou commented 8 years ago

As to enable the pipelines just first and third lines are required, second line will provide ability to autoprovision jenkins, which means that if deploy a pipeline in a project that don't have jenkins installed, will deploy it for you. Not sure whether we want to do this or not.