Skip to content

Instantly share code, notes, and snippets.

@jarifibrahim
Last active January 26, 2019 13:59
Show Gist options
  • Save jarifibrahim/917558bdf6e86da0f2a1d031e30dd60f to your computer and use it in GitHub Desktop.
Save jarifibrahim/917558bdf6e86da0f2a1d031e30dd60f to your computer and use it in GitHub Desktop.
oc new app command to build golang-health-check image/resources
➜ ~ oc new-app -f https://raw.githubusercontent.com/golang-starters/golang-health-check/master/.openshiftio/application.yaml \
-p SOURCE_REPOSITORY_URL=https://github.com/golang-starters/golang-health-check
--> Deploying template "ijarif-preview-stage/launchpad-builder" for "https://raw.githubusercontent.com/golang-starters/golang-health-check/master/.openshiftio/application.yaml" to project ijarif-preview-stage
launchpad-builder
---------
This template creates a Build Configuration using an S2I builder.
* With parameters:
* Suffix name=
* Release version=1.0.0
* Source URL=https://github.com/golang-starters/golang-health-check
* Source Branch=master
--> Creating resources ...
imagestream "golang-health-check" created
buildconfig "golang-health-check-s2i" created
service "golang-health-check" created
deploymentconfig "golang-health-check" created
route "golang-health-check" created
--> Success
Use 'oc start-build golang-health-check-s2i' to start a build.
Run 'oc status' to view your app.
➜ ~ oc start-build golang-health-check-s2i
build "golang-health-check-s2i-1" started
➜ ~ oc logs -f bc/golang-health-check-s2i
Cloning "https://github.com/golang-starters/golang-health-check" ...
Commit: b9138fe8bd15a0c1a3abe53b08ca9ee861f8bef3 (Merge pull request #3 from jarifibrahim/master)
Author: Ibrahim Jarif <jarifibrahim@gmail.com>
Date: Wed Jan 2 15:02:54 2019 +0530
Pulling image "centos/go-toolset-7-centos7" ...
Using centos/go-toolset-7-centos7 as the s2i builder image
Pulling image "docker-registry.default.svc:5000/ijarif-preview-stage/golang-health-check:1.0.0" ...
pulling image error : Error: image ijarif-preview-stage/golang-health-check:1.0.0 not found
Assembling GOPATH...
Assembling GOPATH... DONE
Resolving dependencies...
github.com/elazarl/go-bindata-assetfs (download)
github.com/elazarl/go-bindata-assetfs
github.com/golang-starters/golang-health-check
Resolving dependencies... DONE
Building...
Building... DONE
Pushing image docker-registry.default.svc:5000/ijarif-preview-stage/golang-health-check:1.0.0 ...
Pushed 1/10 layers, 10% complete
Pushed 2/10 layers, 20% complete
Pushed 3/10 layers, 31% complete
Pushed 4/10 layers, 41% complete
Pushed 5/10 layers, 51% complete
Pushed 6/10 layers, 61% complete
Pushed 7/10 layers, 72% complete
Pushed 8/10 layers, 82% complete
Pushed 9/10 layers, 92% complete
Pushed 10/10 layers, 100% complete
Push successful
➜ ~
➜ ~ oc new-app centos/go-toolset-7-centos7:latest~https://github.com/golang-starters/golang-health-check
--> Found Docker image e772efd (7 weeks old) from Docker Hub for "centos/go-toolset-7-centos7:latest"
Go 1.10
-------
Go 1.10 available as docker container is a base platform for building and running various Go 1.10 applications and frameworks. Go is an easy to learn, powerful, statically typed language in the C/C++ tradition with garbage collection, concurrent programming support, and memory safety features.
Tags: builder, golang, golang18, rh-golang18, go
* An image stream will be created as "go-toolset-7-centos7:latest" that will track the source image
* A source build using source code from https://github.com/golang-starters/golang-health-check will be created
* The resulting image will be pushed to image stream "golang-health-check:latest"
* Every time "go-toolset-7-centos7:latest" changes a new build will be triggered
* This image will be deployed in deployment config "golang-health-check"
* The image does not expose any ports - if you want to load balance or send traffic to this component
you will need to create a service with 'expose dc/golang-health-check --port=[port]' later
--> Creating resources ...
imagestream "go-toolset-7-centos7" created
imagestream "golang-health-check" created
buildconfig "golang-health-check" created
deploymentconfig "golang-health-check" created
--> Success
Build scheduled, use 'oc logs -f bc/golang-health-check' to track its progress.
Run 'oc status' to view your app.
➜ ~ oc logs -f bc/golang-health-check
Cloning "https://github.com/golang-starters/golang-health-check" ...
Commit: b9138fe8bd15a0c1a3abe53b08ca9ee861f8bef3 (Merge pull request #3 from jarifibrahim/master)
Author: Ibrahim Jarif <jarifibrahim@gmail.com>
Date: Wed Jan 2 15:02:54 2019 +0530
Pulling image "centos/go-toolset-7-centos7@sha256:f515aea549980c0d2595fc9b7a9cc2e5822be952889a200f2bb9954619ceafe3" ...
Using centos/go-toolset-7-centos7@sha256:f515aea549980c0d2595fc9b7a9cc2e5822be952889a200f2bb9954619ceafe3 as the s2i builder image
Assembling GOPATH...
Assembling GOPATH... DONE
Resolving dependencies...
github.com/elazarl/go-bindata-assetfs (download)
github.com/elazarl/go-bindata-assetfs
github.com/golang-starters/golang-health-check
Resolving dependencies... DONE
Building...
Building... DONE
Pushing image docker-registry.default.svc:5000/ijarif-preview-stage/golang-health-check:latest ...
Pushed 0/10 layers, 0% complete
Pushed 0/10 layers, 6% complete
Pushed 1/10 layers, 10% complete
Pushed 2/10 layers, 20% complete
Pushed 3/10 layers, 30% complete
Pushed 4/10 layers, 40% complete
Pushed 5/10 layers, 50% complete
Pushed 6/10 layers, 60% complete
Pushed 7/10 layers, 70% complete
Pushed 8/10 layers, 80% complete
Pushed 9/10 layers, 90% complete
Pushed 10/10 layers, 100% complete
Push successful
➜ ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment