Deploy a sample Kubernetes application as follows:
The following output appears:
Using project "alice" on server "https://ocp.example.com:8443".
oc new-app centos/ruby-25-Centos7~https://github.com/sclorg/ruby-ex.git
--> Found Docker image c4310a5 (8 days old) from Docker Hub for "centos/ruby-25-centos7"
Ruby 2.5 -------- Ruby 2.5 available as container is a base platform for building and running various Ruby 2.5 applications and frameworks. Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible.
Tags: builder, ruby, ruby25, rh-ruby25
* An image stream tag will be created as "ruby-25-centos7:latest" that will track the source image
* A source build using source code from https://github.com/sclorg/ruby-ex.git will be created
* The resulting image will be pushed to image stream tag "ruby-ex:latest"
* Every time "ruby-25-centos7:latest" changes a new build will be triggered
* This image will be deployed in deployment config "ruby-ex"
* Port 8080/tcp will be load balanced by service "ruby-ex"
* Other containers can access this service through the hostname "ruby-ex"
--> Creating resources ...
imagestream.image.openshift.io "ruby-25-centos7" created
imagestream.image.openshift.io "ruby-ex" created
buildconfig.build.openshift.io "ruby-ex" created
deploymentconfig.apps.openshift.io "ruby-ex" created
service "ruby-ex" created
Build scheduled, use 'oc logs -f bc/ruby-ex' to track its progress.
Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
'oc expose svc/ruby-ex'
Run 'oc status' to view your app.
oc logs -f bc/ruby-ex
Cloning "https://github.com/sclorg/ruby-ex.git" ...
Commit: c00ecd7c762590f1d52c316c7d00141a745ede18 (Merge pull request #25 from pvalena/master)
Author: Honza Horak <email@example.com>
Date: Thu Dec 13 15:35:54 2018 +0100
Using centos/ruby-25-centos7@sha256:7a931fd172cb6a852ca2d7903dd6ac6b65d808e158223b5276b51016d283fc1b as the s2i builder image
---> Installing application source ...
---> Building your Ruby application from source ...
---> Running 'bundle install --retry 2 --deployment --without development:test' ...
Warning: the running version of Bundler (1.16.1) is older than the version that created the lockfile (1.16.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler` .
Fetching gem metadata from https://rubygems.org/..............
Using bundler 1.16.1
Fetching puma 3.12.0
Installing puma 3.12.0 with native extensions
Fetching rack 2.0.6
Installing rack 2.0.6
Bundle complete! 2 Gemfile dependencies, 3 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into `./bundle`
---> Cleaning up unused ruby gems ...
Running `bundle clean --verbose` with bundler 1.16.1
Warning: the running version of Bundler (1.16.1) is older than the version that created the lockfile (1.16.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Frozen, using resolution from the lockfile
Pushing image docker-registry.default.svc:5000/alice/ruby-ex:latest ...
Pushed 0/10 layers, 1% complete
Pushed 10/10 layers, 100% complete
oc expose svc/ruby-ex
Figure 27. OpenShift Console: Sample application view
If you have questions, contact Red Hat Support.
The following three figures show representative Cluster Console pages for:
Figure 28. OpenShift Console health check
Figure 29. Checking nodes
Figure 30. OpenShift Console projects