k3s/examples/guestbook-go/_src/README.md

60 lines
2.0 KiB
Markdown
Raw Normal View History

2015-07-14 00:13:09 +00:00
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
<!-- BEGIN STRIP_FOR_RELEASE -->
2016-07-15 09:44:58 +00:00
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
2016-07-15 09:44:58 +00:00
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
2016-07-15 09:44:58 +00:00
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
2016-07-15 09:44:58 +00:00
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
2016-07-15 09:44:58 +00:00
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.
<!-- TAG RELEASE_LINK, added by the munger automatically -->
<strong>
The latest release of this document can be found
[here](http://releases.k8s.io/release-1.3/examples/guestbook-go/_src/README.md).
Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--
<!-- END STRIP_FOR_RELEASE -->
2015-07-14 00:13:09 +00:00
<!-- END MUNGE: UNVERSIONED_WARNING -->
2015-07-17 22:35:41 +00:00
Updated guestbook based on suggestions in the pull request Port of current guestbook's README.md Fix guestbook pod and service names Add go boilerplate Use role label for redis pods Give service.containerPort a name based value This gives better env variable keys like REDIS_MASTER_SERVICE_REDIS_SERVER_ADDR, etc. Avoid unnecessarily long names for service (esp in env vars) Adding guestbook deploy/destroy scripts for k8s These are probably only useful for quick testing. Maybe remove them before merging the pull request. Part of avoiding long names for services Update Dockerfiles to git clone from Google's repo Use correct service names while deleting them Fix the script usage path. K8s is not go gettable. Use git clone instead. Using my fork in the Dockerfile to release and update to the docker hub image. Doesn't delete all pods if you remove controller too soon Run the command in a shell to substitute env vars. Workaround for GoogleCloudPlatform/kubernetes#1309 GoogleCloudPlatform in lieu of my fork in Dckrfile Some directory structure changes for guestbook src README that explains the build process for source Strip down the html and css to absolute essentials Reformat JS according to Google's guidelines Also added code to set random colors for elements. Handle repetitive error checks using a common func Also uses @roberthbailey’s stripped down code for reading env vars infoString isn't really a string. Use info instead Remove deploy.sh/destroy.sh scripts Bind submit instead of keypress to capture submit Add links to /env and /info in the footer Reformat the JS Incorporating suggestions by @filbranden License boilerplate and some fixes to release.sh Update README.md Update README.md Add building on boot2docker info to README Accept docker bin path as a param for building Use kubernetes user to host the image on registry Don't get included in k8s's recursive build deps https://github.com/GoogleCloudPlatform/kubernetes/pull/1299#discussion_r 17638061
2014-09-12 17:35:02 +00:00
## Building and releasing Guestbook Image
This process employs building two docker images, one compiles the source and the other hosts the compiled binaries.
Updated guestbook based on suggestions in the pull request Port of current guestbook's README.md Fix guestbook pod and service names Add go boilerplate Use role label for redis pods Give service.containerPort a name based value This gives better env variable keys like REDIS_MASTER_SERVICE_REDIS_SERVER_ADDR, etc. Avoid unnecessarily long names for service (esp in env vars) Adding guestbook deploy/destroy scripts for k8s These are probably only useful for quick testing. Maybe remove them before merging the pull request. Part of avoiding long names for services Update Dockerfiles to git clone from Google's repo Use correct service names while deleting them Fix the script usage path. K8s is not go gettable. Use git clone instead. Using my fork in the Dockerfile to release and update to the docker hub image. Doesn't delete all pods if you remove controller too soon Run the command in a shell to substitute env vars. Workaround for GoogleCloudPlatform/kubernetes#1309 GoogleCloudPlatform in lieu of my fork in Dckrfile Some directory structure changes for guestbook src README that explains the build process for source Strip down the html and css to absolute essentials Reformat JS according to Google's guidelines Also added code to set random colors for elements. Handle repetitive error checks using a common func Also uses @roberthbailey’s stripped down code for reading env vars infoString isn't really a string. Use info instead Remove deploy.sh/destroy.sh scripts Bind submit instead of keypress to capture submit Add links to /env and /info in the footer Reformat the JS Incorporating suggestions by @filbranden License boilerplate and some fixes to release.sh Update README.md Update README.md Add building on boot2docker info to README Accept docker bin path as a param for building Use kubernetes user to host the image on registry Don't get included in k8s's recursive build deps https://github.com/GoogleCloudPlatform/kubernetes/pull/1299#discussion_r 17638061
2014-09-12 17:35:02 +00:00
Releasing the image requires that you have access to the docker registry user account which will host the image. You can specify the registry including the user account by setting the environment variable `REGISTRY`.
Updated guestbook based on suggestions in the pull request Port of current guestbook's README.md Fix guestbook pod and service names Add go boilerplate Use role label for redis pods Give service.containerPort a name based value This gives better env variable keys like REDIS_MASTER_SERVICE_REDIS_SERVER_ADDR, etc. Avoid unnecessarily long names for service (esp in env vars) Adding guestbook deploy/destroy scripts for k8s These are probably only useful for quick testing. Maybe remove them before merging the pull request. Part of avoiding long names for services Update Dockerfiles to git clone from Google's repo Use correct service names while deleting them Fix the script usage path. K8s is not go gettable. Use git clone instead. Using my fork in the Dockerfile to release and update to the docker hub image. Doesn't delete all pods if you remove controller too soon Run the command in a shell to substitute env vars. Workaround for GoogleCloudPlatform/kubernetes#1309 GoogleCloudPlatform in lieu of my fork in Dckrfile Some directory structure changes for guestbook src README that explains the build process for source Strip down the html and css to absolute essentials Reformat JS according to Google's guidelines Also added code to set random colors for elements. Handle repetitive error checks using a common func Also uses @roberthbailey’s stripped down code for reading env vars infoString isn't really a string. Use info instead Remove deploy.sh/destroy.sh scripts Bind submit instead of keypress to capture submit Add links to /env and /info in the footer Reformat the JS Incorporating suggestions by @filbranden License boilerplate and some fixes to release.sh Update README.md Update README.md Add building on boot2docker info to README Accept docker bin path as a param for building Use kubernetes user to host the image on registry Don't get included in k8s's recursive build deps https://github.com/GoogleCloudPlatform/kubernetes/pull/1299#discussion_r 17638061
2014-09-12 17:35:02 +00:00
To build and release the guestbook image:
cd examples/guestbook-go/_src
make release
Updated guestbook based on suggestions in the pull request Port of current guestbook's README.md Fix guestbook pod and service names Add go boilerplate Use role label for redis pods Give service.containerPort a name based value This gives better env variable keys like REDIS_MASTER_SERVICE_REDIS_SERVER_ADDR, etc. Avoid unnecessarily long names for service (esp in env vars) Adding guestbook deploy/destroy scripts for k8s These are probably only useful for quick testing. Maybe remove them before merging the pull request. Part of avoiding long names for services Update Dockerfiles to git clone from Google's repo Use correct service names while deleting them Fix the script usage path. K8s is not go gettable. Use git clone instead. Using my fork in the Dockerfile to release and update to the docker hub image. Doesn't delete all pods if you remove controller too soon Run the command in a shell to substitute env vars. Workaround for GoogleCloudPlatform/kubernetes#1309 GoogleCloudPlatform in lieu of my fork in Dckrfile Some directory structure changes for guestbook src README that explains the build process for source Strip down the html and css to absolute essentials Reformat JS according to Google's guidelines Also added code to set random colors for elements. Handle repetitive error checks using a common func Also uses @roberthbailey’s stripped down code for reading env vars infoString isn't really a string. Use info instead Remove deploy.sh/destroy.sh scripts Bind submit instead of keypress to capture submit Add links to /env and /info in the footer Reformat the JS Incorporating suggestions by @filbranden License boilerplate and some fixes to release.sh Update README.md Update README.md Add building on boot2docker info to README Accept docker bin path as a param for building Use kubernetes user to host the image on registry Don't get included in k8s's recursive build deps https://github.com/GoogleCloudPlatform/kubernetes/pull/1299#discussion_r 17638061
2014-09-12 17:35:02 +00:00
To build and release the guestbook image with a different registry and version:
Updated guestbook based on suggestions in the pull request Port of current guestbook's README.md Fix guestbook pod and service names Add go boilerplate Use role label for redis pods Give service.containerPort a name based value This gives better env variable keys like REDIS_MASTER_SERVICE_REDIS_SERVER_ADDR, etc. Avoid unnecessarily long names for service (esp in env vars) Adding guestbook deploy/destroy scripts for k8s These are probably only useful for quick testing. Maybe remove them before merging the pull request. Part of avoiding long names for services Update Dockerfiles to git clone from Google's repo Use correct service names while deleting them Fix the script usage path. K8s is not go gettable. Use git clone instead. Using my fork in the Dockerfile to release and update to the docker hub image. Doesn't delete all pods if you remove controller too soon Run the command in a shell to substitute env vars. Workaround for GoogleCloudPlatform/kubernetes#1309 GoogleCloudPlatform in lieu of my fork in Dckrfile Some directory structure changes for guestbook src README that explains the build process for source Strip down the html and css to absolute essentials Reformat JS according to Google's guidelines Also added code to set random colors for elements. Handle repetitive error checks using a common func Also uses @roberthbailey’s stripped down code for reading env vars infoString isn't really a string. Use info instead Remove deploy.sh/destroy.sh scripts Bind submit instead of keypress to capture submit Add links to /env and /info in the footer Reformat the JS Incorporating suggestions by @filbranden License boilerplate and some fixes to release.sh Update README.md Update README.md Add building on boot2docker info to README Accept docker bin path as a param for building Use kubernetes user to host the image on registry Don't get included in k8s's recursive build deps https://github.com/GoogleCloudPlatform/kubernetes/pull/1299#discussion_r 17638061
2014-09-12 17:35:02 +00:00
VERSION=v4 REGISTRY="docker.io/luebken" make build
Updated guestbook based on suggestions in the pull request Port of current guestbook's README.md Fix guestbook pod and service names Add go boilerplate Use role label for redis pods Give service.containerPort a name based value This gives better env variable keys like REDIS_MASTER_SERVICE_REDIS_SERVER_ADDR, etc. Avoid unnecessarily long names for service (esp in env vars) Adding guestbook deploy/destroy scripts for k8s These are probably only useful for quick testing. Maybe remove them before merging the pull request. Part of avoiding long names for services Update Dockerfiles to git clone from Google's repo Use correct service names while deleting them Fix the script usage path. K8s is not go gettable. Use git clone instead. Using my fork in the Dockerfile to release and update to the docker hub image. Doesn't delete all pods if you remove controller too soon Run the command in a shell to substitute env vars. Workaround for GoogleCloudPlatform/kubernetes#1309 GoogleCloudPlatform in lieu of my fork in Dckrfile Some directory structure changes for guestbook src README that explains the build process for source Strip down the html and css to absolute essentials Reformat JS according to Google's guidelines Also added code to set random colors for elements. Handle repetitive error checks using a common func Also uses @roberthbailey’s stripped down code for reading env vars infoString isn't really a string. Use info instead Remove deploy.sh/destroy.sh scripts Bind submit instead of keypress to capture submit Add links to /env and /info in the footer Reformat the JS Incorporating suggestions by @filbranden License boilerplate and some fixes to release.sh Update README.md Update README.md Add building on boot2docker info to README Accept docker bin path as a param for building Use kubernetes user to host the image on registry Don't get included in k8s's recursive build deps https://github.com/GoogleCloudPlatform/kubernetes/pull/1299#discussion_r 17638061
2014-09-12 17:35:02 +00:00
If you want to, you can build and push the image step by step:
Updated guestbook based on suggestions in the pull request Port of current guestbook's README.md Fix guestbook pod and service names Add go boilerplate Use role label for redis pods Give service.containerPort a name based value This gives better env variable keys like REDIS_MASTER_SERVICE_REDIS_SERVER_ADDR, etc. Avoid unnecessarily long names for service (esp in env vars) Adding guestbook deploy/destroy scripts for k8s These are probably only useful for quick testing. Maybe remove them before merging the pull request. Part of avoiding long names for services Update Dockerfiles to git clone from Google's repo Use correct service names while deleting them Fix the script usage path. K8s is not go gettable. Use git clone instead. Using my fork in the Dockerfile to release and update to the docker hub image. Doesn't delete all pods if you remove controller too soon Run the command in a shell to substitute env vars. Workaround for GoogleCloudPlatform/kubernetes#1309 GoogleCloudPlatform in lieu of my fork in Dckrfile Some directory structure changes for guestbook src README that explains the build process for source Strip down the html and css to absolute essentials Reformat JS according to Google's guidelines Also added code to set random colors for elements. Handle repetitive error checks using a common func Also uses @roberthbailey’s stripped down code for reading env vars infoString isn't really a string. Use info instead Remove deploy.sh/destroy.sh scripts Bind submit instead of keypress to capture submit Add links to /env and /info in the footer Reformat the JS Incorporating suggestions by @filbranden License boilerplate and some fixes to release.sh Update README.md Update README.md Add building on boot2docker info to README Accept docker bin path as a param for building Use kubernetes user to host the image on registry Don't get included in k8s's recursive build deps https://github.com/GoogleCloudPlatform/kubernetes/pull/1299#discussion_r 17638061
2014-09-12 17:35:02 +00:00
make clean
make build
make push
2015-07-14 00:13:09 +00:00
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/guestbook-go/_src/README.md?pixel)]()
2015-07-14 00:13:09 +00:00
<!-- END MUNGE: GENERATED_ANALYTICS -->