Added sample application and pipeline.
This commit is contained in:
@ -32,7 +32,7 @@ For this demonstration we will be using [[https://developers.redhat.com/products
|
||||
The first step to prepare the demo is to install the dev spaces operator so our cluster will be able to create cloud based development environments. We can install the operator programmatically by creating a ~subscription~ resource:
|
||||
|
||||
#+begin_src bash :results silent
|
||||
cat << EOF | oc apply -f -
|
||||
cat << EOF | oc apply --filename -
|
||||
apiVersion: operators.coreos.com/v1alpha1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
@ -55,7 +55,7 @@ Once the operator is installed we can create a devspaces controller instance, th
|
||||
Once again we can do this programmatically by creating a ~checluster~ resource:
|
||||
|
||||
#+begin_src bash :results silent
|
||||
cat << EOF | oc apply -f -
|
||||
cat << EOF | oc apply --filename -
|
||||
apiVersion: org.eclipse.che/v2
|
||||
kind: CheCluster
|
||||
metadata:
|
||||
@ -106,7 +106,8 @@ EOF
|
||||
Once the dev workspace operator and controller are ready we can create our individual developer workspace.
|
||||
|
||||
#+begin_src bash :results silent
|
||||
cat << EOF | oc apply -f -
|
||||
oc new-project opentlc-mgr-devspaces
|
||||
cat << EOF | oc apply --filename -
|
||||
kind: DevWorkspace
|
||||
apiVersion: workspace.devfile.io/v1alpha2
|
||||
metadata:
|
||||
@ -145,4 +146,22 @@ EOF
|
||||
|
||||
** Deploy sample application
|
||||
|
||||
In order to showcase incorporating ~roxctl~ into developer workflows we need a sample application to tinker with.
|
||||
In order to showcase incorporating ~roxctl~ into developer workflows we need a sample application to tinker with. For our purposes included in a subdirectory here is a small version of the classic kubernetes guestbook app.
|
||||
|
||||
We can deploy the application to our OpenShift cluster using the collection of yaml manifests in ~manifests/~ subdirectory. These will create a new ~deployment~, ~imagestream~, ~pipeline~ that in conjunction will deploy our application. We then trigger the deployment with the included ~pipelinerun~ resource.
|
||||
|
||||
The pipeline we run does rely on a secret containing our ~roxctl~ credentials so let's create that now as well.
|
||||
|
||||
#+begin_src bash :results silent
|
||||
export $(cat .env)
|
||||
|
||||
oc new-project guestbook
|
||||
|
||||
oc create secret generic roxsecrets \
|
||||
--from-literal=rox_api_token="${rox_api_token}" \
|
||||
--from-literal=rox_central_endpoint="${rox_central_endpoint}" \
|
||||
--dry-run=client --output=yaml \
|
||||
| oc apply --filename -
|
||||
|
||||
oc apply --filename guestbook/manifests
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user