These scripts bootstrap a Rancher server and register one or more host node VMs to it.
- Google Cloud SDK - SDK
gce-10acre-ranch [opts]
-a - Agent Container:
needs full container repo/name[:tag]
-b - Boot disk size in GB (40 default)
-c - Cluster name[Required]
-d - DELETE ALL NODES
-e - External IP for master...(yes this is getting ridiculous)
-h - Print this message
-i - Show the IP address of the master
-l - List nodes or clusters if no -c is passed
-m - Master Machine type (g1-small default)
-M - Node Machine type (g1-small default)
-n - Number of nodes [defaults to 1]
-N - Network [default is default]
-o - OS image
centos-6 (Servers only. Configuration is manual)
centos-7 (Servers only. Configuration is manual)
rhel-6 (Servers only. Config is manual)
rhel-7 (Servers only. Config is manual)
coreos-<version>
coreos (stable)
debian-7-backports
fedora-21 (Rancher Labs Only)
ubuntu-<version>
-p - privileged (needed for fedora)
- server
- agent
- all
-q - Do not prompt user
-r - Registration url
-R - REPOS to use for rancher/server:master build
-s - Server Container:
needs full container repo/name[:tag]
-u - Docker install URL
-U - Docker version 1.12, 1.13, 17.06 ..etc. Overrides -u
-z - Zone [us-central1-f default]
Set the GCE Project via environment variable: GCE_PROJECT="<project>"
For CoreOS and Ubuntu first look at the output of:
gcloud compute images list --project <project>
These versions do not always have aliases and update frequently. So we are just passing that along.
The default is Ubuntu-14-04 if no -o option is specified.
./gce-10acre-ranch -c <clustername> -n <number of nodes>
gce-10acre-ranch -s rancher/server:master -p server -c rancher-dev -n 1
Currently all nodes will be deployed with Ubuntu 14.04. The naming convention is: -10acre-master-0 -10acre-[1:N]
For more customizations/testing capabilities you can sepecify the Docker images for server and agents:
Server
./gce-10acre-ranch -c <clustername> -n <number of nodes> -s rancher/server:vX.Y.Z
Agent
./gce-10acre-ranch -c <clustername> -n <number of nodes> -a <user>/agent:vX.Y.Z
Or both
./gce-10acre-ranch -c <clustername> -n <number of nodes> -a <user>/agent:vX.Y.Z -s <user>/dev-server
The Docker images must be real and accessible to Docker.
Ability to use repos for rancher/server:master
./gce-10acre-ranch -c <cluster name> -R rancher-compose-executor
./gce-10acre-rancher -c <cluser name> -R rancher-compose-executor,https://github.com/rancher/cattle,origin/otherbranch
./gce-10acre-ranch -c <cluster name> -i
You can hit this IP over port 8080 to get to the UI
./gce-10acre-ranch -l
./gce-10acre-ranch -c <cluster name> -l
./gce-10acre-ranch -c <cluster name> -d (-q)
- Docker for Mac (https://www.docker.com/products/docker#/mac) (for docker-machine)
- docker-machine-driver-xhyve (https://github.com/zchee/docker-machine-driver-xhyve)
mac-ranch [opts] cluster_name
Top-level actions:
-c - Create cluster
-d - Destroy cluster
-h - Print this message
-i - Print IP of server VM
-l - List cluser VMs
-p - Stop cluster
-P - Start cluster
-r registration_url - Create "-n" additional hosts using the given registration url
Additional create options:
-b - Boot2Docker URL or version tag (default: RancherOS Latest)
-M - Host memory in MB (default: 1024)
-m - Server memory in MB (default: 2048)
-n - Number of hosts (default: 2)
-R - REPOS to use for master build (implies -s rancher/server:master)
-s - Server Container image (default: rancher/server:latest)
-u - Registry mirror URL (default: none)
./mac-ranch -c rs
./mac-ranch -c -s rancher/server:vX.Y.Z rs
./mac-ranch -c -s rancher/server:master rs
./mac-ranch -c -R "https://github.com/you/cattle,origin/yourbranch" rs
./mac-ranch -l rs # List VMs
./mac-ranch -p rs # Stop VMs
./mac-ranch -P rs # Start VMs
./mac-ranch -d rs # Destroy VMS
For bugs, questions, comments, corrections, suggestions, etc., open an issue in rancher/rancher with a title starting with [10acre-ranch]
.
Or just click here to create a new issue.
Copyright (c) 2014-2017 Rancher Labs, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.