mirror of https://github.com/k3s-io/k3s
Rename cloudcfg to kubecfg
parent
61b00739a3
commit
c97c514742
12
README.md
12
README.md
|
@ -49,22 +49,22 @@ hack/dev-build-and-up.sh
|
||||||
Once you have your instances up and running, the `build-go.sh` script sets up
|
Once you have your instances up and running, the `build-go.sh` script sets up
|
||||||
your Go workspace and builds the Go components.
|
your Go workspace and builds the Go components.
|
||||||
|
|
||||||
The `cloudcfg.sh` script spins up two containers, running [Nginx](http://nginx.org/en/) and with port 80 mapped to 8080:
|
The `kubecfg.sh` script spins up two containers, running [Nginx](http://nginx.org/en/) and with port 80 mapped to 8080:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd kubernetes
|
cd kubernetes
|
||||||
hack/build-go.sh
|
hack/build-go.sh
|
||||||
cluster/cloudcfg.sh -p 8080:80 run dockerfile/nginx 2 myNginx
|
cluster/kubecfg.sh -p 8080:80 run dockerfile/nginx 2 myNginx
|
||||||
```
|
```
|
||||||
|
|
||||||
To stop the containers:
|
To stop the containers:
|
||||||
```
|
```
|
||||||
cluster/cloudcfg.sh stop myNginx
|
cluster/kubecfg.sh stop myNginx
|
||||||
```
|
```
|
||||||
|
|
||||||
To delete the containers:
|
To delete the containers:
|
||||||
```
|
```
|
||||||
cluster/cloudcfg.sh rm myNginx
|
cluster/kubecfg.sh rm myNginx
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running a container (more complete version)
|
### Running a container (more complete version)
|
||||||
|
@ -75,7 +75,7 @@ Assuming you've run `hack/dev-build-and-up.sh` and `hack/build-go.sh`:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd kubernetes
|
cd kubernetes
|
||||||
cluster/cloudcfg.sh -c api/examples/pod.json create /pods
|
cluster/kubecfg.sh -c api/examples/pod.json create /pods
|
||||||
```
|
```
|
||||||
|
|
||||||
Where pod.json contains something like:
|
Where pod.json contains something like:
|
||||||
|
@ -112,7 +112,7 @@ cd kubernetes
|
||||||
hack/local-up.sh
|
hack/local-up.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
This will build and start a lightweight local cluster, consisting of a master and a single minion. Type Control-C to shut it down. While it's running, you can use `hack/localcfg.sh` in place of `cluster/cloudcfg.sh` to talk to it.
|
This will build and start a lightweight local cluster, consisting of a master and a single minion. Type Control-C to shut it down. While it's running, you can use `hack/localcfg.sh` in place of `cluster/kubecfg.sh` to talk to it.
|
||||||
|
|
||||||
## Where to go next?
|
## Where to go next?
|
||||||
[Detailed example application](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/guestbook/guestbook.md)
|
[Detailed example application](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/guestbook/guestbook.md)
|
||||||
|
|
|
@ -15,7 +15,7 @@ To build Kubernetes you need to have access to a Docker installation through eit
|
||||||
* `make-binaries.sh`: This will compile all of the Kubernetes binaries in a Docker container
|
* `make-binaries.sh`: This will compile all of the Kubernetes binaries in a Docker container
|
||||||
* `run-tests.sh`: This will run the Kubernetes unit tests in a Docker container
|
* `run-tests.sh`: This will run the Kubernetes unit tests in a Docker container
|
||||||
* `run-integration.sh`: This will build and run the integration test in a Docker container
|
* `run-integration.sh`: This will build and run the integration test in a Docker container
|
||||||
* `make-cross.sh`: This will make all cross-compiled binaries (currently just cloudcfg).
|
* `make-cross.sh`: This will make all cross-compiled binaries (currently just kubecfg).
|
||||||
* `copy-output.sh`: This will copy the contents of `output/build` from any remote Docker container to the local `output/build`. Right now this is only necessary on Mac OS X with `boot2docker`.
|
* `copy-output.sh`: This will copy the contents of `output/build` from any remote Docker container to the local `output/build`. Right now this is only necessary on Mac OS X with `boot2docker`.
|
||||||
* `make-clean.sh`: Clean out the contents of `output/build`.
|
* `make-clean.sh`: Clean out the contents of `output/build`.
|
||||||
* `shell.sh`: Drop into a `bash` shell in a build container with a snapshot of the current repo code.
|
* `shell.sh`: Drop into a `bash` shell in a build container with a snapshot of the current repo code.
|
||||||
|
|
|
@ -33,7 +33,7 @@ function make-binaries() {
|
||||||
apiserver
|
apiserver
|
||||||
controller-manager
|
controller-manager
|
||||||
kubelet
|
kubelet
|
||||||
cloudcfg
|
kubecfg
|
||||||
localkube"
|
localkube"
|
||||||
|
|
||||||
ARCH_TARGET="${KUBE_TARGET}/${GOOS}/${GOARCH}"
|
ARCH_TARGET="${KUBE_TARGET}/${GOOS}/${GOARCH}"
|
||||||
|
|
|
@ -21,7 +21,7 @@ set -e
|
||||||
source $(dirname $0)/common.sh
|
source $(dirname $0)/common.sh
|
||||||
|
|
||||||
readonly CROSS_BINARIES="
|
readonly CROSS_BINARIES="
|
||||||
cloudcfg
|
kubecfg
|
||||||
"
|
"
|
||||||
|
|
||||||
for platform in ${KUBE_CROSSPLATFORMS}; do
|
for platform in ${KUBE_CROSSPLATFORMS}; do
|
||||||
|
|
|
@ -295,7 +295,7 @@ function push-images-to-gcs() {
|
||||||
function package-tarballs() {
|
function package-tarballs() {
|
||||||
mkdir -p "${RELEASE_DIR}"
|
mkdir -p "${RELEASE_DIR}"
|
||||||
|
|
||||||
# Find all of the built cloudcfg binaries
|
# Find all of the built kubecfg binaries
|
||||||
for platform in output/build/*/* ; do
|
for platform in output/build/*/* ; do
|
||||||
echo $platform
|
echo $platform
|
||||||
local PLATFORM_TAG=$(echo $platform | awk -F / '{ printf "%s-%s", $3, $4 }')
|
local PLATFORM_TAG=$(echo $platform | awk -F / '{ printf "%s-%s", $3, $4 }')
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
source $(dirname $0)/util.sh
|
source $(dirname $0)/util.sh
|
||||||
|
|
||||||
CLOUDCFG=$(dirname $0)/../output/go/cloudcfg
|
CLOUDCFG=$(dirname $0)/../output/go/kubecfg
|
||||||
if [ ! -x $CLOUDCFG ]; then
|
if [ ! -x $CLOUDCFG ]; then
|
||||||
echo "Could not find cloudcfg binary. Run hack/build-go.sh to build it."
|
echo "Could not find kubecfg binary. Run hack/build-go.sh to build it."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -27,7 +27,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
kube_client "github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
kube_client "github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudcfg"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubecfg"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
)
|
)
|
||||||
|
@ -52,15 +52,15 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func usage() {
|
func usage() {
|
||||||
fmt.Fprint(os.Stderr, `usage: cloudcfg -h [-c config/file.json] [-p :,..., :] <method>
|
fmt.Fprint(os.Stderr, `usage: kubecfg -h [-c config/file.json] [-p :,..., :] <method>
|
||||||
|
|
||||||
Kubernetes REST API:
|
Kubernetes REST API:
|
||||||
cloudcfg [OPTIONS] get|list|create|delete|update <url>
|
kubecfg [OPTIONS] get|list|create|delete|update <url>
|
||||||
|
|
||||||
Manage replication controllers:
|
Manage replication controllers:
|
||||||
cloudcfg [OPTIONS] stop|rm|rollingupdate <controller>
|
kubecfg [OPTIONS] stop|rm|rollingupdate <controller>
|
||||||
cloudcfg [OPTIONS] run <image> <replicas> <controller>
|
kubecfg [OPTIONS] run <image> <replicas> <controller>
|
||||||
cloudcfg [OPTIONS] resize <controller> <replicas>
|
kubecfg [OPTIONS] resize <controller> <replicas>
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
`)
|
`)
|
||||||
|
@ -76,7 +76,7 @@ func readConfig(storage string) []byte {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Unable to read %v: %#v\n", *config, err)
|
glog.Fatalf("Unable to read %v: %#v\n", *config, err)
|
||||||
}
|
}
|
||||||
data, err = cloudcfg.ToWireFormat(data, storage)
|
data, err = kubecfg.ToWireFormat(data, storage)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Error parsing %v as an object for %v: %#v\n", *config, storage, err)
|
glog.Fatalf("Error parsing %v as an object for %v: %#v\n", *config, storage, err)
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ func main() {
|
||||||
|
|
||||||
var auth *kube_client.AuthInfo
|
var auth *kube_client.AuthInfo
|
||||||
if secure {
|
if secure {
|
||||||
auth, err = cloudcfg.LoadAuthInfo(*authConfig)
|
auth, err = kubecfg.LoadAuthInfo(*authConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Error loading auth: %#v", err)
|
glog.Fatalf("Error loading auth: %#v", err)
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ func main() {
|
||||||
|
|
||||||
if *proxy {
|
if *proxy {
|
||||||
glog.Info("Starting to serve on localhost:8001")
|
glog.Info("Starting to serve on localhost:8001")
|
||||||
server := cloudcfg.NewProxyServer(*www, *httpServer, auth)
|
server := kubecfg.NewProxyServer(*www, *httpServer, auth)
|
||||||
glog.Fatal(server.Serve())
|
glog.Fatal(server.Serve())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ func main() {
|
||||||
func executeAPIRequest(method string, auth *kube_client.AuthInfo) bool {
|
func executeAPIRequest(method string, auth *kube_client.AuthInfo) bool {
|
||||||
parseStorage := func() string {
|
parseStorage := func() string {
|
||||||
if len(flag.Args()) != 2 {
|
if len(flag.Args()) != 2 {
|
||||||
glog.Fatal("usage: cloudcfg [OPTIONS] get|list|create|update|delete <url>")
|
glog.Fatal("usage: kubecfg [OPTIONS] get|list|create|update|delete <url>")
|
||||||
}
|
}
|
||||||
return strings.Trim(flag.Arg(1), "/")
|
return strings.Trim(flag.Arg(1), "/")
|
||||||
}
|
}
|
||||||
|
@ -172,13 +172,13 @@ func executeAPIRequest(method string, auth *kube_client.AuthInfo) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
var printer cloudcfg.ResourcePrinter
|
var printer kubecfg.ResourcePrinter
|
||||||
if *json {
|
if *json {
|
||||||
printer = &cloudcfg.IdentityPrinter{}
|
printer = &kubecfg.IdentityPrinter{}
|
||||||
} else if *yaml {
|
} else if *yaml {
|
||||||
printer = &cloudcfg.YAMLPrinter{}
|
printer = &kubecfg.YAMLPrinter{}
|
||||||
} else {
|
} else {
|
||||||
printer = &cloudcfg.HumanReadablePrinter{}
|
printer = &kubecfg.HumanReadablePrinter{}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = printer.PrintObj(obj, os.Stdout); err != nil {
|
if err = printer.PrintObj(obj, os.Stdout); err != nil {
|
||||||
|
@ -193,7 +193,7 @@ func executeAPIRequest(method string, auth *kube_client.AuthInfo) bool {
|
||||||
func executeControllerRequest(method string, auth *kube_client.AuthInfo) bool {
|
func executeControllerRequest(method string, auth *kube_client.AuthInfo) bool {
|
||||||
parseController := func() string {
|
parseController := func() string {
|
||||||
if len(flag.Args()) != 2 {
|
if len(flag.Args()) != 2 {
|
||||||
glog.Fatal("usage: cloudcfg [OPTIONS] stop|rm|rollingupdate <controller>")
|
glog.Fatal("usage: kubecfg [OPTIONS] stop|rm|rollingupdate <controller>")
|
||||||
}
|
}
|
||||||
return flag.Arg(1)
|
return flag.Arg(1)
|
||||||
}
|
}
|
||||||
|
@ -203,14 +203,14 @@ func executeControllerRequest(method string, auth *kube_client.AuthInfo) bool {
|
||||||
var err error
|
var err error
|
||||||
switch method {
|
switch method {
|
||||||
case "stop":
|
case "stop":
|
||||||
err = cloudcfg.StopController(parseController(), c)
|
err = kubecfg.StopController(parseController(), c)
|
||||||
case "rm":
|
case "rm":
|
||||||
err = cloudcfg.DeleteController(parseController(), c)
|
err = kubecfg.DeleteController(parseController(), c)
|
||||||
case "rollingupdate":
|
case "rollingupdate":
|
||||||
err = cloudcfg.Update(parseController(), c, *updatePeriod)
|
err = kubecfg.Update(parseController(), c, *updatePeriod)
|
||||||
case "run":
|
case "run":
|
||||||
if len(flag.Args()) != 4 {
|
if len(flag.Args()) != 4 {
|
||||||
glog.Fatal("usage: cloudcfg [OPTIONS] run <image> <replicas> <controller>")
|
glog.Fatal("usage: kubecfg [OPTIONS] run <image> <replicas> <controller>")
|
||||||
}
|
}
|
||||||
image := flag.Arg(1)
|
image := flag.Arg(1)
|
||||||
replicas, err := strconv.Atoi(flag.Arg(2))
|
replicas, err := strconv.Atoi(flag.Arg(2))
|
||||||
|
@ -218,18 +218,18 @@ func executeControllerRequest(method string, auth *kube_client.AuthInfo) bool {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Error parsing replicas: %#v", err)
|
glog.Fatalf("Error parsing replicas: %#v", err)
|
||||||
}
|
}
|
||||||
err = cloudcfg.RunController(image, name, replicas, c, *portSpec, *servicePort)
|
err = kubecfg.RunController(image, name, replicas, c, *portSpec, *servicePort)
|
||||||
case "resize":
|
case "resize":
|
||||||
args := flag.Args()
|
args := flag.Args()
|
||||||
if len(args) < 3 {
|
if len(args) < 3 {
|
||||||
glog.Fatal("usage: cloudcfg resize <controller> <replicas>")
|
glog.Fatal("usage: kubecfg resize <controller> <replicas>")
|
||||||
}
|
}
|
||||||
name := args[1]
|
name := args[1]
|
||||||
replicas, err := strconv.Atoi(args[2])
|
replicas, err := strconv.Atoi(args[2])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Error parsing replicas: %#v", err)
|
glog.Fatalf("Error parsing replicas: %#v", err)
|
||||||
}
|
}
|
||||||
err = cloudcfg.ResizeController(name, replicas, c)
|
err = kubecfg.ResizeController(name, replicas, c)
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
}
|
}
|
|
@ -37,16 +37,16 @@ Create a file named `redis-master.json` describing a single pod, which runs a re
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you have that pod file, you can create the redis pod in your Kubernetes cluster using the `cloudcfg` CLI:
|
Once you have that pod file, you can create the redis pod in your Kubernetes cluster using the `kubecfg` CLI:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cluster/cloudcfg.sh -c examples/guestbook/redis-master.json create /pods
|
$ cluster/kubecfg.sh -c examples/guestbook/redis-master.json create /pods
|
||||||
```
|
```
|
||||||
|
|
||||||
Once that's up you can list the pods in the cluster, to verify that the master is running:
|
Once that's up you can list the pods in the cluster, to verify that the master is running:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cluster/cloudcfg.sh list /pods
|
cluster/kubecfg.sh list /pods
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll see a single redis master pod. It will also display the machine that the pod is running on.
|
You'll see a single redis master pod. It will also display the machine that the pod is running on.
|
||||||
|
@ -87,10 +87,10 @@ The pod that you created in Step One has the label `name=redis-master`. The sele
|
||||||
|
|
||||||
This will cause all pods to see the redis master apparently running on localhost:10000.
|
This will cause all pods to see the redis master apparently running on localhost:10000.
|
||||||
|
|
||||||
Once you have that service description, you can create the service with the `cloudcfg` cli:
|
Once you have that service description, you can create the service with the `kubecfg` cli:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cluster/cloudcfg.sh -c examples/guestbook/redis-master-service.json create /services
|
$ cluster/kubecfg.sh -c examples/guestbook/redis-master-service.json create /services
|
||||||
Name Label Query Port
|
Name Label Query Port
|
||||||
---------- ---------- ----------
|
---------- ---------- ----------
|
||||||
redismaster name=redis-master 10000
|
redismaster name=redis-master 10000
|
||||||
|
@ -127,7 +127,7 @@ Create a file named `redis-slave-controller.json` that contains:
|
||||||
Then you can create the service by running:
|
Then you can create the service by running:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cluster/cloudcfg.sh -c examples/guestbook/redis-slave-controller.json create /replicationControllers
|
$ cluster/kubecfg.sh -c examples/guestbook/redis-slave-controller.json create /replicationControllers
|
||||||
Name Image(s) Selector Replicas
|
Name Image(s) Selector Replicas
|
||||||
---------- ---------- ---------- ----------
|
---------- ---------- ---------- ----------
|
||||||
redisSlaveController brendanburns/redis-slave name=redisslave 2
|
redisSlaveController brendanburns/redis-slave name=redisslave 2
|
||||||
|
@ -142,7 +142,7 @@ redis-server --slaveof $SERVICE_HOST $REDISMASTER_SERVICE_PORT
|
||||||
Once that's up you can list the pods in the cluster, to verify that the master and slaves are running:
|
Once that's up you can list the pods in the cluster, to verify that the master and slaves are running:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cluster/cloudcfg.sh list /pods
|
$ cluster/kubecfg.sh list /pods
|
||||||
Name Image(s) Host Labels
|
Name Image(s) Host Labels
|
||||||
---------- ---------- ---------- ----------
|
---------- ---------- ---------- ----------
|
||||||
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
||||||
|
@ -169,12 +169,12 @@ Just like the master, we want to have a service to proxy connections to the read
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This time the selector for the service is `name=redis-slave`, because that identifies the pods running redis slaves. It may also be helpful to set labels on your service itself--as we've done here--to make it easy to locate them with the `cloudcfg -l "label=value" list sevices` command.
|
This time the selector for the service is `name=redis-slave`, because that identifies the pods running redis slaves. It may also be helpful to set labels on your service itself--as we've done here--to make it easy to locate them with the `kubecfg -l "label=value" list sevices` command.
|
||||||
|
|
||||||
Now that you have created the service specification, create it in your cluster with the `cloudcfg` CLI:
|
Now that you have created the service specification, create it in your cluster with the `kubecfg` CLI:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cluster/cloudcfg.sh -c examples/guestbook/redis-slave-service.json create /services
|
$ cluster/kubecfg.sh -c examples/guestbook/redis-slave-service.json create /services
|
||||||
Name Label Query Port
|
Name Label Query Port
|
||||||
---------- ---------- ----------
|
---------- ---------- ----------
|
||||||
redisslave name=redisslave 10001
|
redisslave name=redisslave 10001
|
||||||
|
@ -210,7 +210,7 @@ Create a file named `frontend-controller.json`:
|
||||||
With this file, you can turn up your frontend with:
|
With this file, you can turn up your frontend with:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cluster/cloudcfg.sh -c examples/guestbook/frontend-controller.json create /replicationControllers
|
$ cluster/kubecfg.sh -c examples/guestbook/frontend-controller.json create /replicationControllers
|
||||||
Name Image(s) Selector Replicas
|
Name Image(s) Selector Replicas
|
||||||
---------- ---------- ---------- ----------
|
---------- ---------- ---------- ----------
|
||||||
frontendController brendanburns/php-redis name=frontend 3
|
frontendController brendanburns/php-redis name=frontend 3
|
||||||
|
@ -219,7 +219,7 @@ frontendController brendanburns/php-redis name=frontend 3
|
||||||
Once that's up you can list the pods in the cluster, to verify that the master, slaves and frontends are running:
|
Once that's up you can list the pods in the cluster, to verify that the master, slaves and frontends are running:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ cluster/cloudcfg.sh list /pods
|
$ cluster/kubecfg.sh list /pods
|
||||||
Name Image(s) Host Labels
|
Name Image(s) Host Labels
|
||||||
---------- ---------- ---------- ----------
|
---------- ---------- ---------- ----------
|
||||||
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
||||||
|
|
|
@ -22,7 +22,7 @@ source $(dirname $0)/config-go.sh
|
||||||
|
|
||||||
cd "${KUBE_TARGET}"
|
cd "${KUBE_TARGET}"
|
||||||
|
|
||||||
BINARIES="proxy integration apiserver controller-manager kubelet cloudcfg localkube"
|
BINARIES="proxy integration apiserver controller-manager kubelet kubecfg localkube"
|
||||||
|
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
BINARIES="$@"
|
BINARIES="$@"
|
||||||
|
|
|
@ -35,7 +35,7 @@ set -e
|
||||||
# Use testing config
|
# Use testing config
|
||||||
export KUBE_CONFIG_FILE="config-test.sh"
|
export KUBE_CONFIG_FILE="config-test.sh"
|
||||||
export KUBE_REPO_ROOT="$(dirname $0)/.."
|
export KUBE_REPO_ROOT="$(dirname $0)/.."
|
||||||
export CLOUDCFG="${KUBE_REPO_ROOT}/cluster/cloudcfg.sh"
|
export CLOUDCFG="${KUBE_REPO_ROOT}/cluster/kubecfg.sh"
|
||||||
|
|
||||||
source "${KUBE_REPO_ROOT}/cluster/util.sh"
|
source "${KUBE_REPO_ROOT}/cluster/util.sh"
|
||||||
${KUBE_REPO_ROOT}/hack/build-go.sh
|
${KUBE_REPO_ROOT}/hack/build-go.sh
|
||||||
|
|
|
@ -28,7 +28,7 @@ set -e
|
||||||
(
|
(
|
||||||
source $(dirname $0)/config-go.sh
|
source $(dirname $0)/config-go.sh
|
||||||
cd "${KUBE_TARGET}"
|
cd "${KUBE_TARGET}"
|
||||||
BINARIES="cloudcfg localkube"
|
BINARIES="kubecfg localkube"
|
||||||
for b in $BINARIES; do
|
for b in $BINARIES; do
|
||||||
echo "+++ Building ${b}"
|
echo "+++ Building ${b}"
|
||||||
go build "${KUBE_GO_PACKAGE}"/cmd/${b}
|
go build "${KUBE_GO_PACKAGE}"/cmd/${b}
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# This file is exactly like cloudcfg.sh, but it talks to a local master
|
# This file is exactly like kubecfg.sh, but it talks to a local master
|
||||||
# (which you're assumed to be running with localkube.sh).
|
# (which you're assumed to be running with localkube.sh).
|
||||||
|
|
||||||
CLOUDCFG=$(dirname $0)/../output/go/cloudcfg
|
CLOUDCFG=$(dirname $0)/../output/go/kubecfg
|
||||||
if [ ! -x $CLOUDCFG ]; then
|
if [ ! -x $CLOUDCFG ]; then
|
||||||
echo "Could not find cloudcfg binary. Run hack/build-go.sh to build it."
|
echo "Could not find kubecfg binary. Run hack/build-go.sh to build it."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Package cloudcfg is a set of libraries that are used by the cloudcfg command line tool.
|
// Package kubecfg is a set of libraries that are used by the kubecfg command line tool.
|
||||||
// They are separated out into a library to support unit testing. Most functionality should
|
// They are separated out into a library to support unit testing. Most functionality should
|
||||||
// be included in this package, and the main cloudcfg should really just be an entry point.
|
// be included in this package, and the main kubecfg should really just be an entry point.
|
||||||
package cloudcfg
|
package kubecfg
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudcfg
|
package kubecfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudcfg
|
package kubecfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudcfg
|
package kubecfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudcfg
|
package kubecfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudcfg
|
package kubecfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudcfg
|
package kubecfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudcfg
|
package kubecfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package cloudcfg
|
package kubecfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
|
@ -92,7 +92,7 @@ set_tag $RELEASE_FULL_TAG_PATH $RELEASE_FULL_PATH
|
||||||
|
|
||||||
echo "Release pushed ($RELEASE_PREFIX$RELEASE_NAME)."
|
echo "Release pushed ($RELEASE_PREFIX$RELEASE_NAME)."
|
||||||
|
|
||||||
# This isn't quite working right now. Need to figure out packaging the cloudcfg tool.
|
# This isn't quite working right now. Need to figure out packaging the kubecfg tool.
|
||||||
# echo " Launch with:"
|
# echo " Launch with:"
|
||||||
# echo
|
# echo
|
||||||
# echo " curl -s -L ${RELEASE_FULL_PATH/gs:\/\//http://storage.googleapis.com/}/launch-kubernetes.sh | bash"
|
# echo " curl -s -L ${RELEASE_FULL_PATH/gs:\/\//http://storage.googleapis.com/}/launch-kubernetes.sh | bash"
|
||||||
|
|
Loading…
Reference in New Issue