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

Modifying the Pipelines section #414

Merged
merged 5 commits into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/images/hello-world_deployments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/hello-world_john.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/openshift_online_console.png
Binary file not shown.
Binary file added docs/images/openshift_online_deployments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/oso_projects.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/pipeline_firstrun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/pipeline_jenkins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/proj_gh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/promote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/rollout_to_run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/vertx_stage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions docs/topics/hello_world_developers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ include::modules/about_application_codebases.adoc[leveloffset=+1]

include::modules/creating_new_application.adoc[leveloffset=+1]

include::modules/about_stage_run.adoc[leveloffset=+1]
include::modules/about_pipelines_stage_and_run.adoc[leveloffset=+1]

include::modules/working_with_pipelines.adoc[leveloffset=+1]
include::modules/reviewing_your_staged_application.adoc[leveloffset=+1]

include::modules/viewing_build_pipeline_oso.adoc[leveloffset=+1]
include::modules/approving_your_application.adoc[leveloffset=+1]

include::modules/approving_build_pipeline.adoc[leveloffset=+1]
include::modules/viewing_build_pipeline_logs.adoc[leveloffset=+1]

include::modules/optional_detailed_views.adoc[leveloffset=+1]
include::modules/viewing_codebase_github.adoc[leveloffset=+1]

include::modules/viewing_project_github.adoc[leveloffset=+1]
include::modules/viewing_application_deployment_details.adoc[leveloffset=+1]

include::modules/viewing_projects_oso.adoc[leveloffset=+1]
include::modules/viewing_oso_projects.adoc[leveloffset=+1]

include::modules/about_workspaces.adoc[leveloffset=+1]

Expand Down
2 changes: 1 addition & 1 deletion docs/topics/modules/about_pipelines.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

_Pipelines_ define how your application is deployed. Each pipeline has multiple stages with a varying set of capabilities. They are crucial to ensure a continuous delivery system that test and deploy the code at each step to provide feedback to the user. Examples of such steps are unit testing, performance, integration, and deployment. Each step of the pipeline implements a different level of testing and deployment tasks, provides results, and then passes the code on to the next step.

In {osio}, you configure a pipeline build when creating or importing a project. The pipeline build is triggered when a collaborator commits a change to the code repository.
In {osio}, you initiate a pipeline build when creating or importing a project. The pipeline build is triggered when a collaborator commits a change to the code repository.
11 changes: 11 additions & 0 deletions docs/topics/modules/about_pipelines_stage_and_run.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[id="about_pipelines_stage_run"]
= About pipelines and the stage and run environments

When you create a codebase, a pipeline build is initiated. Pipelines are automated, continuous integration and deployment processes, powered by Jenkins, which define how your application is deployed.

The free OpenShift Online Starter subscription, included with your {osio} subscription, provides two environments named _Stage_ and _Run_ to deploy your applications.

Initially, the build pipeline deploys the application to _Stage_, which is accessible to stakeholders for review through a public URL provided by OpenShift Online. If approved and promoted, the pipeline deploys it to the _Run_ environment. This simulates the workflow of pushing an application to a staging environment and reviewing it, before promoting it to production.

The _Run_ environment is similar to a production environment but is another staging area. The reason _Run_ is not named _Production_ is that the OpenShift Online Starter subscription does not support running production applications.
//See link:https://www.openshift.com/pricing/index.html[purchasing an OpenShift Online Pro subscription] for information about support for running production applications.
11 changes: 0 additions & 11 deletions docs/topics/modules/about_stage_run.adoc

This file was deleted.

43 changes: 0 additions & 43 deletions docs/topics/modules/approving_build_pipeline.adoc

This file was deleted.

14 changes: 14 additions & 0 deletions docs/topics/modules/approving_your_application.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[id="approving_your_application"]
= Approving your application

If the quickstart application in the _Stage_ environment runs as expected, approve your application and promote it to the _Run_ environment:

. Return to the {osio} tab which displays the *Pipeline* view and click btn:[Input Required] at the *Approve* stage of the pipeline.

. Click btn:[Promote] to promote the application from the _Stage_ environment to the _Run_ environment. This process requires a few minutes.
+
image::promote.png[Promote application]
. Optionally, as your application is promoted to _Run_, click *helloworldvertx* or *Build #1* to view the detailed progress of the pipeline or build in your OpenShift Online console, respectively.
. When the *Pipeline* view in {osio} indicates that the application is available in the _Run_ environment, click the icon (image:rollout_icon.png[title="Rollout"]) next to *Rollout to Run* to view the application in a new tab.
+
image::rollout_to_run.png[Rollout to Run]
2 changes: 1 addition & 1 deletion docs/topics/modules/creating_new_application.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ifeval::["{context}" == "user-guide"]
+
image::choose_mission_runtime.png[Choose mission and runtime]
+
. In the *Select Pipeline* section, select the appropriate option, then click the blue arrow to continue to the next step. The first option is suggested for most use cases because it provides stages to test your changes for each pipeline build. For more information see <<working_with_pipelines>>.
. In the *Select Pipeline* section, select the appropriate option, then click the blue arrow to continue to the next step. The first option is suggested for most use cases. For more information see <<working_with_pipelines>>.
+
image::select_pipeline.png[Select a pipeline]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ include::modules/creating_new_space.adoc[leveloffset=+1]

include::modules/creating_new_project.adoc[leveloffset=+1]

include::modules/working_with_pipelines.adoc[leveloffset=+1]
include::modules/reviewing_your_staged_application.adoc[leveloffset=+1]

include::modules/viewing_build_pipeline_oso.adoc[leveloffset=+1]

include::modules/approving_build_pipeline.adoc[leveloffset=+1]
include::modules/approving_your_application.adoc[leveloffset=+1]

include::modules/optional_detailed_views.adoc[leveloffset=+1]

include::modules/viewing_project_github.adoc[leveloffset=+1]

include::modules/viewing_projects_oso.adoc[leveloffset=+1]
include::modules/viewing_projects_oso.adoc[leveloffset=+1]
2 changes: 1 addition & 1 deletion docs/topics/modules/next_steps.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you followed the instructions in this document, you have now learned about {o
* Create new projects using the quickstart wizards and test them. See <<hello_world_developers>> for a Vert.X project.
//and <<spring_boot_quickstart_tutorial>> for a Spring Boot project.
* Plan your work by creating work items and execute them using iterative development cycles. See <<planning_your_work>>.
* Use the build pipelines to stage reviews in the *Stage* and *Run* environments. See <<working_with_pipelines>>.
* Use the build pipelines to stage reviews in the *Stage* and *Run* environments. See <<reviewing_your_staged_application>> and <<approving_your_application>>.
* Create Che workspaces to edit your project code and commit the changes to GitHub. See <<creating_che_workspace-hello-world>> and <<committing_pushing_changes_git-hello-world>>.
* Optimize the memory usage for your projects to use your OpenShift Online resources more efficiently. See <<optimizing_memory_usage>>.
// and <<reducing_project_memory_usage-spring-boot>>.
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/modules/optional_detailed_views.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[id="optional_detailed_views"]
= (Optional) Detailed views

Optionally, you can see an experimental detailed *Deployments* view for the *Test*, <<about_stage_run,*Stage*, and *Run*>> environments. This view displays the environment deployments, pods, events, and other information.
Optionally, you can see an experimental detailed *Deployments* view for the *Test*, <<about_pipelines_stage_run,*Stage*, and *Run*>> environments. This view displays the environment deployments, pods, events, and other information.

View the details for the *Deployments* as follows:

Expand Down
26 changes: 26 additions & 0 deletions docs/topics/modules/reviewing_your_staged_application.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[id="reviewing_your_staged_application"]
= Reviewing your staged application

When you create a new codebase, the selected pipeline pushes version 1.0.1 of your new application into the _Stage_ environment, and then awaits your approval to deploy into the _Run_ environment.

<<about_pipelines_stage_run,_Stage_ and _Run_>> are individual OpenShift projects. _Stage_ is a production staging area to review and test changes before they are finalized and then staged on _Run_.

To review your application on _Stage_:

. At the top of the page, click *Create*, and then click *Pipelines* to see the build pipelines for your new application. When you create a new codebase, the selected pipeline is triggered. In the *Build Release* stage of the pipeline, the build server is set, the build is started, and then released. Next, the pipeline build pushes the application to stage and it displays at the *Approve* stage. This process takes a few minutes.
+
image::pipeline_firstrun.png[Pipeline First Run]
+
NOTE: If your pipeline build does not start for more than ten minutes, you can manually start a pipeline build using the instructions at <<pipeline_build_failure>>.

. Click the icon (image:rollout_icon.png[title="Rollout"]) next to *Rollout to Stage* in the displayed pipeline. OpenShift Online provides this public URL to access the staged quickstart application.
+
A new browser tab displays the HTTP Booster application running on _Stage_. The Vert.x HTTP booster quickstart produces a simple API behind a REST endpoint over HTTP with a minimalist user interface.
+
image::vertx_stage.png[Staged Application]
+
NOTE: If the application does not load, see <<application_not_available>> for troubleshooting information.

. To test the application, enter a name in the *Name* field and click btn:[Invoke]. The *Result* field displays the JSON result returning from the API.
+
image::hello-world_john.png[Test the Application]
15 changes: 15 additions & 0 deletions docs/topics/modules/viewing_application_deployment_details.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[id="viewing_application_deployment_details"]
= Viewing your application deployment details

You can see a detailed view of your application pods in the <<about_pipelines_stage_run,stage, and run>> environments, resources consumed in the two environments, and the overall resources used by the application in the *Deployments* view as follows:

. At the top of the page, click *Create* and then click *Deployments* to see the deployment details.
. In *Applications*, expand *helloworldvertx* to see the application pods and the resources consumed in the *stage* and *run* environments respectively. The *Resource Usage* at the bottom of the screen displays the overall resources used by your applications in {osio}.
+
image::hello-world_deployments.png[Deployments page]
. To see further deployment details in your OpenShift Online console, in either the *Stage* or *Run* environments, click the options (image:kabob.png[title="Options"]) icon and then click *View OpenShift Console*.

. If prompted, click btn:[LOGIN WITH RED HAT] to log in to your OpenShift Online account. When logged in, the OpenShift Online console displays an overview of your application.
. In the left pane, click *Applications* > *Deployments* to view details about the application deployment in the appropriate environment.
+
image::openshift_online_deployments.png[OpenShift Online Deployments]
14 changes: 14 additions & 0 deletions docs/topics/modules/viewing_build_pipeline_logs.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[id="viewing_build_pipeline_logs"]
Copy link
Contributor

Choose a reason for hiding this comment

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

It's very difficult to judge what has changed when we move files, so I wonder if @rkratky's idea about a separate PR for changing file names (if there are any changes within the file) is something to follow in these cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, sounds like a good convention to follow from henceforth, meanwhile here is an attempt at trying to lessen the pain a bit:

Existing modules mapped to renamed ones:
about_stage_run.adoc > about_pipelines_stage_and_run.adoc
working_with_pipelines.adoc > reviewing_your_staged_application.adoc
approving_build_pipeline.adoc >approving_your_application.adoc
viewing_build_pipeline_oso.adoc > viewing_build_pipeline_logs.adoc
optional_detailed_views.adoc> viewing_application_deployment_details.adoc (Removed the internal Feature flag info as it is Beta, removed otional, as it has some important information relvant to developers and I wonder if we need to add a line or two about scaling pods up and down)
viewing_project_github.adoc > viewing_codebase_github.adoc
viewing_projects_oso>viewing_oso_projects

Earlier sequence of modules:
about_stage_run.adoc
working_with_pipelines.adoc
viewing_build_pipeline_oso.adoc
approving_build_pipeline.adoc
optional_detailed_views.adoc
viewing_project_github.adoc
viewing_projects_oso

Current Sequence of modules:
about_pipelines_stage_and_run.adoc
reviewing_your_staged_application.adoc
approving_your_application.adoc
viewing_build_pipeline_logs.adoc
viewing_application_deployment_details.adoc
viewing_codebase_github.adoc
viewing_oso_projects
Hope this helps.

= (Optional) Viewing the build pipeline logs
Copy link
Contributor

Choose a reason for hiding this comment

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

This has changed to optional but it's not meant to be. While the user waits, we definitely want them to go see the logs to get an idea of what's happening (and see how to access this information in their OSO account)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Viewing the build pipeline logs is an optional section even in the original doc. I distinctly remember back in the demo days this was used to divert attention from the long wait time for a pipeline to go from one stage to another. I have tested this around 3 or 4 times now and the pipelines are executed fairly faster now.
This section is purely for troubleshooting (for advanced users) as the first paragraph clearly points out and imho we could safely add this to the User guide/ a detailed use case for pipelines section. This is definitely not something a user has to or should do as part of promoting his application. As to 'letting the user know what's happening' the UX has become fairly descriptive now, actually telling users what is happening, especially when the pipeline is first triggered. I actually liked that!

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, it's useful to know where the logs are but if it's not a necessary part of the workflow anymore, we can just get rid of it, tbh. No need to clutter it up with more instructions that are useful.


Optionally, while you wait for the pipeline build, you can view the build details in the Jenkins log. For experienced users, these logs are useful when troubleshooting problems with builds if required.

. In the *Pipeline* page, click *View Log* for the build pipeline in progress.
. When prompted, log into Jenkins with your OpenShift Online account. If the page does not display, wait for a few minutes for the Jenkins instance to initialize and try again.
Once you are logged in, the page displays the logs for your pipeline build.
+
image::pipeline_jenkins.png[Pipeline Build Logs in Jenkins]
+
WARNING: Do not click the *Proceed* or *Abort* options at the end of the logs.

You can now examine the log output to troubleshoot build problems if needed.
20 changes: 0 additions & 20 deletions docs/topics/modules/viewing_build_pipeline_oso.adoc

This file was deleted.

11 changes: 11 additions & 0 deletions docs/topics/modules/viewing_codebase_github.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[id="viewing_codebase_github"]
= Viewing your codebase in GitHub

After reviewing your pipeline build running in {osio} and OpenShift Online, view your application <<about_application_codebases,codebase>> in GitHub as follows:

. Return to the *Pipeline* view in {osio}, the *Source Repository* provides the link to the codebase of your application. Right click the link and open it in a new tab to see your codebase in GitHub.
. In the repository, click the *Jenkinsfile* to view details on staging and rolling out of the pipelines.
+
image::proj_gh.png[Project Code in GitHub]

Use the codebase link to review code commits and details in your GitHub repository.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[id="viewing_projects_oso"]
= Viewing projects in OpenShift Online
[id="viewing_oso_projects"]
= Viewing your OpenShift Online projects

To view the OpenShift Online projects that support the pipeline for your project, navigate to your link:https://console.starter-us-east-2.openshift.com/console/projects/[OpenShift Online Console].
To view all the OpenShift Online projects that support your application, navigate to link:https://console.starter-us-east-2.openshift.com/console/projects/[*My Projects*] in the OpenShift Online Console.

image::oso_projects.png[OpenShift Online Projects]

This page displays the following projects and namespaces that are created in OpenShift Online:

* The *_username_* project is where your pipelines run. Your OpenShift Online user name is the name of your project.
* The *_username-che_* project represents your <<about_workspaces,Che Host and workspaces>>.
* The *_username-jenkins_* project represents your Jenkins Master or your Jenkins Slaves. Click *Monitoring* after clicking this project to access your Jenkins console.
* The *_username-jenkins_* project represents your Jenkins Master for your Jenkins Slaves. Click this project, and then click *Monitoring* in the left pane to access your Jenkins console.
* The *_username-run_* project is identical to the *_username-stage_* project and is an environment for experimenting with your OpenShift pods and monitoring the memory usage for your application.
* The *_username-stage_* project is for your personal use. Use this project to see the pods that are created when pipelines are triggered in {osio}. For maintenance, select this project and power down individual pods as required.
17 changes: 0 additions & 17 deletions docs/topics/modules/viewing_project_github.adoc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ After committing your changes, view the resource details for your project again
+
image::optimize_memory.png[Optimizing Hello World Memory Usage]
+
. <<approving_build_pipeline,Promote the application>> to the *Run* environment.
. <<approving_your_application,Promote the application>> to the *Run* environment.
+
You can now compare these details to the details in <<reviewing_detailed_resource_information-{context}>> to see the resource usage improvements.

Expand Down
Loading