-
Notifications
You must be signed in to change notification settings - Fork 266
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
Add support for OpenShift applier #13
Conversation
7ba45d5
to
a66d8bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pabrahamsson before we start testing, let's make the build namespace specific to the app.. so basic-tomcat-build
@etsauer updated with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pabrahamsson This is really good!
I made a couple comments related to making sure normal users would be able to instantiate these pipelines instead of needing to be cluster admins.
- object: projectrequest | ||
content: | ||
- name: basic-tomcat-spaces | ||
file: "{{ inventory_dir }}/../files/projects/projects.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add file_action: create
to allow non privileged users to create projects
- object: projectrequest | ||
content: | ||
- name: simple-spring-boot-spaces | ||
file: "{{ inventory_dir }}/../files/projects/projects.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add file_action: create to allow non privileged users to create projects
file: "{{ inventory_dir }}/../files/projects/projects.yml" | ||
- object: imagestreams | ||
content: | ||
- name: redhat-openjdk18-openshift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creation in the openshift
namespace restricts this example to cluster admins
buildconfig "basic-tomcat-pipeline" created | ||
buildconfig "basic-tomcat" created | ||
``` | ||
|
||
At this point you should be able to go to the Web Console and follow the pipeline by clicking in your `myapp-dev` project, and going to *Builds* -> *Pipelines*. At several points you will be prompted for input on the pipeline. You can interact with it by clicking on the _input required_ link, which takes you to Jenkins, where you can click the *Proceed* button. By the time you get through the end of the pipeline you should be able to visit the Route for your app deployed to the `myapp-prod` project to confirm that your image has been promoted through all stages. | ||
|
||
## Cleanup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add basic-tomcat-build
to delete command
@@ -0,0 +1,32 @@ | |||
apiVersion: v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an assumption that this ImageStream already exists in the cluster. Otherwise running these examples would require cluster-admin
privileges
content: | ||
- name: basic-tomcat-spaces | ||
file: "{{ inventory_dir }}/../files/projects/projects.yml" | ||
- object: imagestreams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove imagestreams
section as it requires cluster-admin
privileges
blue-green-spring/README.md
Outdated
At this point you should be able to go to the Web Console and follow the pipeline by clicking in your `myapp-dev` project, and going to *Builds* -> *Pipelines*. There is a prompt for input on the pipeline before the production route is switched to the new deployment. You can interact with it by clicking on the _input required_ link, which takes you to Jenkins, where you can click the *Proceed* button. By the time you get through the end of the pipeline you should be able to visit the Route for your app deployed to the `myapp-prod` project to confirm that your image has been promoted through all stages. | ||
|
||
## Cleanup | ||
|
||
Cleaning up this example is as simple as deleting the projects we created at the beginning. | ||
|
||
``` | ||
oc delete project simple-spring-boot-dev simple-spring-boot-prod simple-spring-boot-stage | ||
oc delete project spring-boot-web-dev spring-boot-web-prod spring-boot-web-stage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spring-boot-web-build
to the delete command
@@ -0,0 +1,32 @@ | |||
apiVersion: v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an assumption that this ImageStream already exists in the cluster. Otherwise running these examples would require cluster-admin privileges
Thank you for the comments @sabre1041, I've updated accordingly. |
@pabrahamsson LGTM. @etsauer Please review latest changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! thanks @pabrahamsson !
This is for the following two Trello cards:
@etsauer I had to update the
pipeline.groovy
for both apps (tomcat & spring-boot-web) to support the new build project. Let me know if you'd prefer PRs for those two as well (though it looks like #12 will be helpful once merged).