Reduces generation time to 40 seconds for entire site
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
tocs:
|
||||
- guides
|
||||
- reference
|
||||
- samples
|
||||
- support
|
||||
@@ -1,179 +0,0 @@
|
||||
bigheader: "Guides"
|
||||
abstract: "How to get started, and acheive tasks, using Kubernetes"
|
||||
toc:
|
||||
- title: Guides
|
||||
path: /v1.0/
|
||||
|
||||
- title: Quickstarts
|
||||
section:
|
||||
- title: What is Kubernetes?
|
||||
path: /v1.0/docs/whatisk8s/
|
||||
- title: TODO - 5-minute Quickstart
|
||||
path: /v1.0/docs/hellonode/
|
||||
- title: Kubernetes 101
|
||||
path: /v1.0/docs/user-guide/walkthrough/
|
||||
- title: Kubernetes 201
|
||||
path: /v1.0/docs/user-guide/walkthrough/k8s201/
|
||||
|
||||
- title: Running Kubernetes
|
||||
section:
|
||||
- title: Picking the Right Solution
|
||||
path: /v1.0/docs/getting-started-guides/
|
||||
- title: Running Kubernetes on Your Local Machine
|
||||
section:
|
||||
- title: Running Kubernetes Locally via Docker
|
||||
path: /v1.0/docs/getting-started-guides/docker/
|
||||
- title: Running Kubernetes Locally via Vagrant
|
||||
path: /v1.0/docs/getting-started-guides/vagrant/
|
||||
- title: Running Kubernetes Locally with No VM
|
||||
path: /v1.0/docs/getting-started-guides/locally/
|
||||
- title: Running Kubernetes on Turn-key Cloud Solutions
|
||||
section:
|
||||
- title: Running Kubernetes on Google Container Engine
|
||||
path: https://cloud.google.com/container-engine/docs/before-you-begin/
|
||||
- title: Running Kubernetes on Google Compute Engine
|
||||
path: /v1.0/docs/getting-started-guides/gce/
|
||||
- title: Running Kubernetes on AWS EC2
|
||||
path: /v1.0/docs/getting-started-guides/aws/
|
||||
- title: Running Kubernetes on Azure
|
||||
path: /v1.0/docs/getting-started-guides/coreos/azure/
|
||||
- title: Running Kubernetes on Custom Solutions
|
||||
section:
|
||||
- title: Getting Started From Scratch
|
||||
path: /v1.0/docs/getting-started-guides/scratch/
|
||||
- title: Custom Cloud Solutions
|
||||
section:
|
||||
- title: AWS or GCE on CoreOS
|
||||
path: /v1.0/docs/getting-started-guides/coreos/
|
||||
- title: AWS or Joyent on Ubuntu
|
||||
path: /v1.0/docs/getting-started-guides/juju/
|
||||
- title: Rackspace on CoreOS
|
||||
path: /v1.0/docs/getting-started-guides/rackspace/
|
||||
- title: On-Premise VMs
|
||||
section:
|
||||
- title: Vagrant or VMware
|
||||
path: /v1.0/docs/getting-started-guides/coreos/
|
||||
- title: Cloudstack
|
||||
path: /v1.0/docs/getting-started-guides/cloudstack/
|
||||
- title: VMWare
|
||||
path: /v1.0/docs/getting-started-guides/vsphere/
|
||||
- title: Juju
|
||||
path: /v1.0/docs/getting-started-guides/juju/
|
||||
- title: libvirt on CoreOS
|
||||
path: /v1.0/docs/getting-started-guides/libvirt-coreos/
|
||||
- title: oVirt
|
||||
path: /v1.0/docs/getting-started-guides/ovirt/
|
||||
- title: libvirt or KVM
|
||||
path: /v1.0/docs/getting-started-guides/fedora/flannel_multi_node_cluster/
|
||||
- title: Bare Metal
|
||||
section:
|
||||
- title: Offline
|
||||
path: /v1.0/docs/getting-started-guides/coreos/bare_metal_offline/
|
||||
- title: Fedora via Ansible
|
||||
path: /v1.0/docs/getting-started-guides/fedora/fedora_ansible_config/
|
||||
- title: Fedora (Single Node)
|
||||
path: /v1.0/docs/getting-started-guides/fedora/fedora_manual_config/
|
||||
- title: Fedora (Multi Node)
|
||||
path: /v1.0/docs/getting-started-guides/fedora/flannel_multi_node_cluster/
|
||||
- title: Centos
|
||||
path: /v1.0/docs/getting-started-guides/centos/centos_manual_config/
|
||||
- title: Ubuntu
|
||||
path: /v1.0/docs/getting-started-guides/ubuntu/
|
||||
- title: Docker (Multi Node)
|
||||
path: /v1.0/docs/getting-started-guides/docker-multinode/
|
||||
|
||||
- title: Administering Clusters
|
||||
section:
|
||||
- title: Kubernetes Cluster Admin Guide
|
||||
path: /v1.0/docs/admin/
|
||||
- title: Using Multiple Clusters
|
||||
path: /v1.0/docs/admin/multi-cluster/
|
||||
- title: Using Large Clusters
|
||||
path: /v1.0/docs/admin/cluster-large/
|
||||
- title: Building High-Availability Clusters
|
||||
path: /v1.0/docs/admin/high-availability/
|
||||
- title: Accessing Clusters
|
||||
path: /v1.0/docs/user-guide/accessing-the-cluster/
|
||||
- title: Sharing a Cluster
|
||||
path: /v1.0/docs/admin/namespaces/
|
||||
- title: Changing Cluster Size
|
||||
path: https://github.com/kubernetes/kubernetes/wiki/User-FAQ#how-do-i-change-the-size-of-my-cluster/
|
||||
- title: Creating a Custom Cluster from Scratch
|
||||
path: /v1.0/docs/getting-started-guides/scratch/
|
||||
- title: Authenticating Across Clusters with kubeconfig
|
||||
path: /v1.0/docs/user-guide/kubeconfig-file/
|
||||
|
||||
- title: Using Nodes, Pods, and Containers
|
||||
section:
|
||||
- title: Assigning Pods to Nodes
|
||||
path: /v1.0/docs/user-guide/node-selection/
|
||||
- title: Working with Containers
|
||||
path: /v1.0/docs/user-guide/production-pods/
|
||||
- title: Creating Pods with the Downward API
|
||||
path: /v1.0/docs/user-guide/downward-api/
|
||||
- title: Updating Live Pods
|
||||
path: /v1.0/docs/user-guide/update-demo/
|
||||
- title: Running Commands in a Container with kubectl exec
|
||||
path: /v1.0/docs/user-guide/getting-into-containers/
|
||||
|
||||
- title: Networking
|
||||
section:
|
||||
- title: Networking in Kubernetes
|
||||
path: /v1.0/docs/admin/networking/
|
||||
- title: Setting Up and Configuring DNS
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/cluster-dns
|
||||
- title: Connecting Applications
|
||||
path: /v1.0/docs/user-guide/connecting-applications/
|
||||
- title: Creating Servers with External IPs
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/examples/simple-nginx.md
|
||||
- title: Using DNS Pods and Services
|
||||
path: /v1.0/docs/admin/dns/
|
||||
- title: Connect with Proxies
|
||||
path: /v1.0/docs/user-guide/connecting-to-applications-proxy/
|
||||
- title: Connect with Port Forwarding
|
||||
path: /v1.0/docs/user-guide/connecting-to-applications-port-forward/
|
||||
|
||||
- title: Configuring Kubernetes
|
||||
section:
|
||||
- title: Using Configuration Files
|
||||
path: /v1.0/docs/user-guide/simple-yaml/
|
||||
- title: Configuring Containers
|
||||
path: /v1.0/docs/user-guide/configuring-containers/
|
||||
- title: Using Environment Variables
|
||||
path: /v1.0/docs/user-guide/environment-guide/
|
||||
- title: Managing Compute Resources
|
||||
path: /v1.0/docs/user-guide/compute-resources/
|
||||
- title: Applying Resource Quotas and Limits
|
||||
path: /v1.0/docs/admin/resourcequota/
|
||||
- title: Setting Pod CPU and Memory Limits
|
||||
path: /v1.0/docs/admin/limitrange/
|
||||
- title: Configuring Garbage Collection
|
||||
path: /v1.0/docs/admin/garbage-collection/
|
||||
- title: Configuring Kubernetes with Salt
|
||||
path: /v1.0/docs/admin/salt/
|
||||
- title: Best Practices for Configuration
|
||||
path: /v1.0/docs/user-guide/config-best-practices/
|
||||
|
||||
- title: Application Management and Deployment
|
||||
section:
|
||||
- title: "Managing Applications: Prerequisites"
|
||||
path: /v1.0/docs/user-guide/prereqs/
|
||||
- title: Managing Deployments
|
||||
path: /v1.0/docs/user-guide/managing-deployments/
|
||||
- title: Deploying Applications
|
||||
path: /v1.0/docs/user-guide/deploying-applications/
|
||||
- title: Launching, Exposing, and Killing Applications
|
||||
path: /v1.0/docs/user-guide/quick-start/
|
||||
|
||||
- title: Testing and Monitoring
|
||||
section:
|
||||
- title: Simulating Large Test Loads
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/k8petstore
|
||||
- title: Checking Pod Health
|
||||
path: /v1.0/docs/user-guide/liveness/
|
||||
- title: Using Explorer to Examine the Runtime Environment
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/explorer
|
||||
- title: Resource Usage Monitoring
|
||||
path: /v1.0/docs/user-guide/monitoring/
|
||||
- title: Logging
|
||||
path: /v1.0/docs/user-guide/logging/
|
||||
@@ -1,16 +0,0 @@
|
||||
overrides:
|
||||
- path: v1.0/docs/man
|
||||
- path: v1.0/docs/proposals
|
||||
- path: v1.0/docs/api-reference
|
||||
- path: v1.0/docs/user-guide/kubectl
|
||||
- path: v1.0/docs/admin/kube-apiserver.md
|
||||
- path: v1.0/docs/admin/kube-controller-manager.md
|
||||
- path: v1.0/docs/admin/kube-proxy.md
|
||||
- path: v1.0/docs/admin/kube-scheduler.md
|
||||
- path: v1.0/docs/admin/kubelet.md
|
||||
- path: v1.0/docs/user-guide/kubectl
|
||||
- path: v1.0/docs/admin/kube-apiserver.md
|
||||
- path: v1.0/docs/admin/kube-controller-manager.md
|
||||
- path: v1.0/docs/admin/kube-proxy.md
|
||||
- path: v1.0/docs/admin/kube-scheduler.md
|
||||
- path: v1.0/docs/admin/kubelet.md
|
||||
@@ -1,184 +0,0 @@
|
||||
bigheader: "Reference Documentation"
|
||||
abstract: "Design docs, concept definitions, and references for APIs and CLIs."
|
||||
toc:
|
||||
- title: Reference Documentation
|
||||
path: /v1.0/reference/
|
||||
|
||||
- title: Kubernetes API
|
||||
section:
|
||||
- title: Kubernetes API Overview
|
||||
path: /v1.0/docs/api/
|
||||
- title: Kubernetes API Operations
|
||||
path: http://kubernetes.io/v1.0/docs/api-reference/v1/operations.html
|
||||
- title: Kubernetes API Definitions
|
||||
path: http://kubernetes.io/v1.0/docs/api-reference/v1/definitions.html
|
||||
|
||||
- title: Extensions API
|
||||
section:
|
||||
- title: Extensions API Operations
|
||||
path: http://kubernetes.io/v1.0/docs/api-reference/extensions/v1beta1/operations.html
|
||||
- title: Extensions API Definitions
|
||||
path: http://kubernetes.io/v1.0/docs/api-reference/extensions/v1beta1/definitions.html
|
||||
|
||||
- title: kubectl
|
||||
section:
|
||||
- title: kubectl Overview
|
||||
path: /v1.0/docs/user-guide/kubectl-overview/
|
||||
- title: kubectl for Docker Users
|
||||
path: /v1.0/docs/user-guide/docker-cli-to-kubectl/
|
||||
- title: kubectl Commands
|
||||
section:
|
||||
- title: kubectl
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl.md
|
||||
- title: kubectl annotate
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_annotate.md
|
||||
- title: kubectl api-versions
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_api-versions.md
|
||||
- title: kubectl apply
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_apply.md
|
||||
- title: kubectl attach
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_attach.md
|
||||
- title: kubectl autoscale
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_autoscale.md
|
||||
- title: kubectl cluster-info
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_cluster-info.md
|
||||
- title: kubectl config
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_config.md
|
||||
- title: kubectl config set-cluster
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_config_set-cluster.md
|
||||
- title: kubectl config set-context
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_config_set-context.md
|
||||
- title: kubectl set-credentials
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_config_set-credentials.md
|
||||
- title: kubectl config set
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_config_set.md
|
||||
- title: kubectl config unset
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_config_unset.md
|
||||
- title: kubectl config use-context
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_config_use-context.md
|
||||
- title: kubectl config view
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_config_view.md
|
||||
- title: kubectl create
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_create.md
|
||||
- title: kubectl delete
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_delete.md
|
||||
- title: kubectl describe
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_describe.md
|
||||
- title: kubectl edit
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_edit.md
|
||||
- title: kubectl exec
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_exec.md
|
||||
- title: kubectl expose
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_expose.md
|
||||
- title: kubectl get
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_get.md
|
||||
- title: kubectl label
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_label.md
|
||||
- title: kubectl logs
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_logs.md
|
||||
- title: kubectl patch
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_patch.md
|
||||
- title: kubectl port-forward
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_port-forward.md
|
||||
- title: kubectl proxy
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_proxy.md
|
||||
- title: kubectl replace
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_replace.md
|
||||
- title: kubectl rolling-update
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_rolling-update.md
|
||||
- title: kubectl run
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_run.md
|
||||
- title: kubectl scale
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_scale.md
|
||||
- title: kubectl stop
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_stop.md
|
||||
- title: kubectl version
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/kubectl/kubectl_version.md
|
||||
|
||||
- title: kube-apiserver
|
||||
section:
|
||||
- title: Overview
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/admin/kube-apiserver.md
|
||||
- title: Authorization Plugins
|
||||
path: /v1.0/docs/admin/authorization/
|
||||
- title: Authentication
|
||||
path: /v1.0/docs/admin/authentication/
|
||||
- title: Accessing the API
|
||||
path: /v1.0/docs/admin/accessing-the-api/
|
||||
- title: Admission Controllers
|
||||
path: /v1.0/docs/admin/admission-controllers/
|
||||
- title: Managing Service Accounts
|
||||
path: /v1.0/docs/admin/service-accounts-admin/
|
||||
|
||||
- title: kub-scheduler
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/admin/kube-scheduler.md
|
||||
|
||||
- title: kubelet
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/admin/kubelet.md
|
||||
|
||||
- title: kube-proxy
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/admin/kube-proxy.md
|
||||
|
||||
- title: JSONpath
|
||||
path: /v1.0/docs/user-guide/jsonpath/
|
||||
|
||||
- title: etcd
|
||||
path: /v1.0/docs/admin/etcd/
|
||||
|
||||
- title: Concept Definitions
|
||||
section:
|
||||
- title: Container Environment
|
||||
path: /v1.0/docs/user-guide/container-environment/
|
||||
- title: Images
|
||||
path: /v1.0/docs/user-guide/images/
|
||||
- title: Pods
|
||||
path: /v1.0/docs/user-guide/pods/
|
||||
- title: Labels and Selectors
|
||||
path: /v1.0/docs/user-guide/labels/
|
||||
- title: Replication Controller
|
||||
path: /v1.0/docs/user-guide/replication-controller/
|
||||
- title: Services
|
||||
path: /v1.0/docs/user-guide/services/
|
||||
- title: Volumes
|
||||
path: /v1.0/docs/user-guide/volumes/
|
||||
- title: Persistent Volumes
|
||||
path: /v1.0/docs/user-guide/persistent-volumes/
|
||||
- title: Secrets
|
||||
path: /v1.0/docs/user-guide/secrets/
|
||||
- title: Names
|
||||
path: /v1.0/docs/user-guide/identifiers/
|
||||
- title: Namespaces
|
||||
path: /v1.0/docs/user-guide/namespaces/
|
||||
- title: Nodes
|
||||
path: /v1.0/docs/admin/node/
|
||||
- title: Service Accounts
|
||||
path: /v1.0/docs/user-guide/service-accounts/
|
||||
- title: Annotations
|
||||
path: /v1.0/docs/user-guide/annotations/
|
||||
- title: Daemon Sets
|
||||
path: /v1.0/docs/admin/daemons/
|
||||
- title: Deployments
|
||||
path: /v1.0/docs/user-guide/deployments/
|
||||
- title: Ingress Resources
|
||||
path: /v1.0/docs/user-guide/ingress/
|
||||
- title: Horizontal Pod Autoscaling
|
||||
path: /v1.0/docs/user-guide/horizontal-pod-autoscaler/
|
||||
- title: Jobs
|
||||
path: /v1.0/docs/user-guide/jobs/
|
||||
- title: Resource Quotas
|
||||
path: /v1.0/docs/admin/resource-quota/
|
||||
|
||||
- title: Kubernetes Design Docs
|
||||
section:
|
||||
- title: Kubernetes Architecture
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/design/architecture.md
|
||||
- title: Kubernetes Design Overview
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/design/
|
||||
- title: Security in Kubernetes
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/design/security.md
|
||||
- title: Kubernetes Identity and Access Management
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/design/access.md
|
||||
- title: Security Contexts
|
||||
path: https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/design/security_context.md
|
||||
- title: Kubernetes OpenVSwitch GRE/VxLAN networking
|
||||
path: /v1.0/docs/admin/ovs-networking/
|
||||
@@ -1,54 +0,0 @@
|
||||
bigheader: "Samples"
|
||||
abstract: "A collection of example applications that show how to use Kubernetes."
|
||||
toc:
|
||||
- title: Samples
|
||||
path: /v1.0/samples/
|
||||
|
||||
- title: Clustered Application Samples
|
||||
section:
|
||||
- title: Apache Cassandra Database
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/cassandra
|
||||
- title: Apache Spark
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/spark
|
||||
- title: Apache Storm
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/storm
|
||||
- title: Distributed Task Queue
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/celery-rabbitmq
|
||||
- title: Hazelcast
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/hazelcast
|
||||
- title: Meteor Applications
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/meteor/
|
||||
- title: Redis
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/redis/
|
||||
- title: RethinkDB
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/rethinkdb/
|
||||
- title: Elasticsearch/Kibana Logging Demonstration
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/logging-demo/
|
||||
- title: Elasticsearch
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/elasticsearch/
|
||||
- title: OpenShift Origin
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/openshift-origin/
|
||||
- title: Ceph
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/rbd/
|
||||
- title: MEAN stack on Google Cloud Platform
|
||||
path: /v1.0/docs/getting-started-guides/meanstack/
|
||||
|
||||
- title: Persistent Volume Samples
|
||||
section:
|
||||
- title: WordPress on a Kubernetes Persistent Volume
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/mysql-wordpress-pd/
|
||||
- title: GlusterFS
|
||||
path: /https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/glusterfs/
|
||||
- title: iSCSI
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/iscsi/
|
||||
- title: NFS
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/nfs/
|
||||
|
||||
- title: Multi-tier Application Samples
|
||||
section:
|
||||
- title: Guestbook - Go Server
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/guestbook-go/
|
||||
- title: GuestBook - PHP Server
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/guestbook/
|
||||
- title: MySQL - Phabricator Server
|
||||
path: https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/phabricator/
|
||||
@@ -1,40 +0,0 @@
|
||||
bigheader: "Support"
|
||||
abstract: "Troubleshooting resources, frequently asked questions, and community support channels."
|
||||
toc:
|
||||
- title: Support
|
||||
path: /v1.0/docs/troubleshooting/
|
||||
|
||||
- title: Troubleshooting
|
||||
section:
|
||||
- title: Web Interface
|
||||
path: /v1.0/docs/user-guide/ui/
|
||||
- title: Troubleshooting Applications
|
||||
path: /v1.0/docs/user-guide/application-troubleshooting/
|
||||
- title: Troubleshooting Clusters
|
||||
path: /v1.0/docs/admin/cluster-troubleshooting/
|
||||
|
||||
- title: Frequently Asked Questions
|
||||
section:
|
||||
- title: User FAQ
|
||||
path: https://github.com/kubernetes/kubernetes/wiki/User-FAQ/
|
||||
- title: Debugging FAQ
|
||||
path: https://github.com/kubernetes/kubernetes/wiki/Debugging-FAQ/
|
||||
- title: Services FAQ
|
||||
path: https://github.com/kubernetes/kubernetes/wiki/Services-FAQ/
|
||||
|
||||
- title: Other Resources
|
||||
section:
|
||||
- title: Known Issues
|
||||
path: /v1.0/docs/user-guide/known-issues/
|
||||
- title: Kubernetes Issue Tracker on GitHub
|
||||
path: https://github.com/kubernetes/kubernetes/issues/
|
||||
- title: Report a Security Vulnerability
|
||||
path: /v1.0/docs/reporting-security-issues/
|
||||
- title: Release Notes
|
||||
path: https://github.com/kubernetes/kubernetes/releases/
|
||||
- title: Release Roadmap
|
||||
path: /v1.0/docs/roadmap/
|
||||
- title: Contributing to Kubernetes Documentation
|
||||
path: /v1.0/editdocs/
|
||||
- title: Sitemap for v1.0
|
||||
path: /v1.0/pagelist/
|
||||
@@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Untitled Document</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
+98
-15
@@ -1,41 +1,124 @@
|
||||
---
|
||||
layout: headerfooter
|
||||
---
|
||||
<!-- HERO -->
|
||||
{% for thistoc in site.data[page.versionfilesafe].globals.tocs %}{% if foundTOC %}{% break %}{% else %}{% assign tree = site.data[page.versionfilesafe][thistoc].toc %}{% include tocsearch.html %}{% endif %}{% endfor %}
|
||||
{% if page.title %}{% assign title=page.title %}{% endif %}
|
||||
{% for override in site.data.overrides.overrides %}
|
||||
<script>console.log('thispage.path={{ override.path }}, page.path={{ page.path }}')</script>
|
||||
{% if page.path == override.path %}{% assign hideTitle="true" %}{% endif %}
|
||||
{% endfor %}
|
||||
<!Doctype html>
|
||||
<html id="docs">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Roboto+Mono' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="/css/styles.css"/>
|
||||
<link rel="stylesheet" href="/css/overrides.css"/>
|
||||
<script src="/js/script.js"></script>
|
||||
<script src="/js/jquery-2.2.0.min.js"></script>
|
||||
<title>Kubernetes - {{ title }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="cellophane" onclick="kub.toggleMenu()"></div>
|
||||
|
||||
<header>
|
||||
<a href="/" class="logo"></a>
|
||||
<div class="nav-buttons" data-auto-burger="primary">
|
||||
<!--<a href="/get-started" class="button" id="tryKubernetes">Try Kubernetes</a>-->
|
||||
<button id="hamburger" onclick="kub.toggleMenu()" data-auto-burger-exclude><div></div></button>
|
||||
</div>
|
||||
|
||||
<nav id="mainNav">
|
||||
<main data-auto-burger="primary">
|
||||
<div class="nav-box">
|
||||
<h3><a href="">Get Started</a></h3>
|
||||
<p>Built for a multi-cloud world, public, private or hybrid. Seamlessly roll out new features.</p>
|
||||
</div>
|
||||
<div class="nav-box">
|
||||
<h3><a href="">Documentation</a></h3>
|
||||
<p>Pellentesque in ipsum id orci porta dapibus. Nulla porttitor accumsan tincidunt. </p>
|
||||
</div>
|
||||
<div class="nav-box">
|
||||
<h3><a href="">Community</a></h3>
|
||||
<p>Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. </p>
|
||||
</div>
|
||||
<div class="nav-box">
|
||||
<h3><a href="">Blog</a></h3>
|
||||
<p>Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Quisque velit nisi, pretium ut lacinia in. </p>
|
||||
</div>
|
||||
</main>
|
||||
<main data-auto-burger="primary">
|
||||
<div class="left">
|
||||
<h5 class="github-invite">Interested in hacking on the core Kubernetes code base?</h5>
|
||||
<a href="" class="button">View On Github</a>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<h5 class="github-invite">Explore the community</h5>
|
||||
<div class="social">
|
||||
<a href="https://twitter.com/kubernetesio" class="Twitter"><span>twitter</span></a>
|
||||
<a href="https://github.com/kubernetes/kubernetes" class="github"><span>Github</span></a>
|
||||
<a href="http://slack.k8s.io/" class="slack"><span>Slack</span></a>
|
||||
<a href="http://stackoverflow.com/questions/tagged/kubernetes" class="stack-overflow"><span>stackoverflow</span></a>
|
||||
<a href="https://groups.google.com/forum/#!forum/google-containers" class="mailing-list"><span>Mailing List</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear" style="clear: both"></div>
|
||||
</main>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- HERO -->
|
||||
<section id="hero" class="light-text">
|
||||
<h1>{{ site.data[page.versionfilesafe][foundTOC].bigheader }}</h1>
|
||||
<h5>{{ site.data[page.versionfilesafe][foundTOC].abstract }}</h5>
|
||||
<div id="vendorStrip" class="light-text">
|
||||
<ul>
|
||||
<li><a href="/{{ page.version }}/">GUIDES</a></li>
|
||||
<li><a href="/{{ page.version }}/reference">REFERENCE</a></li>
|
||||
<li><a href="/{{ page.version }}/samples">SAMPLES</a></li>
|
||||
<li><a href="/{{ page.version }}/docs/troubleshooting/">SUPPORT</a></li>
|
||||
<li><a href="/{{page.version}}/">GUIDES</a></li>
|
||||
<li><a href="/{{page.version}}/reference">REFERENCE</a></li>
|
||||
<li><a href="/{{page.version}}/samples">SAMPLES</a></li>
|
||||
<li><a href="/{{page.version}}/docs/troubleshooting/">SUPPORT</a></li>
|
||||
</ul>
|
||||
<div class="dropdown">
|
||||
<div class="readout"></div>
|
||||
<a href="/v1.1">Version 1.1</a>
|
||||
<a href="/v1.0">Version 1.0</a>
|
||||
<a href="/v1.1/">Version 1.1</a>
|
||||
<a href="/v1.2/">Version 1.2</a>
|
||||
</div>
|
||||
<input type="text" id="search" placeholder="Search" onkeydown="if (event.keyCode==13) window.location.replace('/search/?q=' + this.value)">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="encyclopedia">{% if page.hideTOC != true %}
|
||||
<section id="encyclopedia">
|
||||
<div id="docsToc">
|
||||
<div class="pi-accordion">
|
||||
{% assign tree = site.data[page.versionfilesafe][foundTOC].toc %}{% include tree.html %}
|
||||
</div> <!-- /pi-accordion -->
|
||||
</div> <!-- /docsToc -->{% endif %}
|
||||
<div id="docsContent">{% if page.showedit == true %}<a href="/{{ page.version }}/editdocs#{{ page.path }}" id="editPageButton">Edit This Page</a>{% endif %}
|
||||
</div> <!-- /docsToc -->
|
||||
<div id="docsContent"><a href="/{{ page.version }}/editdocs#{{ page.path }}" id="editPageButton">Edit This Page</a>
|
||||
<h1>{{ title }}</h1>
|
||||
{{ content }}
|
||||
<p><a href=""><img src="https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/{{ page.path }}?pixel" alt="Analytics" /></a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<main class="light-text">
|
||||
<nav>
|
||||
<a href="/getting-started.html">Getting Started</a>
|
||||
<a href="/docs.html">Documentation</a>
|
||||
<a href="http://blog.kubernetes.io/">Blog</a>
|
||||
<a href="/foobang.html">Community</a>
|
||||
</nav>
|
||||
<div class="social">
|
||||
<a href="https://twitter.com/kubernetesio" class="twitter"><span>twitter</span></a>
|
||||
<a href="https://github.com/kubernetes/kubernetes" class="github"><span>Github</span></a>
|
||||
<a href="http://slack.k8s.io/" class="slack"><span>Slack</span></a>
|
||||
<a href="http://stackoverflow.com/questions/tagged/kubernetes" class="stack-overflow"><span>stackoverflow</span></a>
|
||||
<a href="https://groups.google.com/forum/#!forum/google-containers" class="mailing-list"><span>Mailing List</span></a>
|
||||
<label for="wishField">I wish this page <input type="text" id="wishField" name="wishField" placeholder="made better textfield suggestions"></label>
|
||||
</div>
|
||||
<div class="center">© 2016 Kubernetes</div>
|
||||
</main>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,3 @@
|
||||
{% for thistoc in site.data[page.versionfilesafe].globals.tocs %}{% if foundTOC %}{% break %}{% else %}{% assign tree = site.data[page.versionfilesafe][thistoc].toc %}{% include tocsearch.html %}{% endif %}{% endfor %}
|
||||
{% if page.title %}{% assign title=page.title %}{% endif %}
|
||||
<!Doctype html>
|
||||
<html id="docs">
|
||||
<head>
|
||||
@@ -11,7 +9,7 @@
|
||||
<link rel="stylesheet" href="/css/overrides.css"/>
|
||||
<script src="/js/script.js"></script>
|
||||
<script src="/js/jquery-2.2.0.min.js"></script>
|
||||
<title>Kubernetes - {{ title }}</title>
|
||||
<title>Kubernetes - {{ page.title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="cellophane" onclick="kub.toggleMenu()"></div>
|
||||
@@ -85,7 +83,4 @@
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,18 +0,0 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: prometheus-node-exporter
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: prometheus-node-exporter
|
||||
labels:
|
||||
daemon: prom-node-exp
|
||||
spec:
|
||||
containers:
|
||||
- name: c
|
||||
image: prom/prometheus
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
hostPort: 9090
|
||||
name: serverport
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,8 +0,0 @@
|
||||
# This should be the IP address of the load balancer for all masters
|
||||
MASTER_IP=<insert-ip-here>
|
||||
# This should be the internal service IP address reserved for DNS
|
||||
DNS_IP=<insert-dns-ip-here>
|
||||
|
||||
DAEMON_ARGS="$DAEMON_ARGS --api-servers=https://${MASTER_IP} --enable-debugging-handlers=true --cloud-provider=
|
||||
gce --config=/etc/kubernetes/manifests --allow-privileged=False --v=2 --cluster-dns=${DNS_IP} --cluster-domain=c
|
||||
luster.local --configure-cbr0=true --cgroup-root=/ --system-container=/system "
|
||||
@@ -1,87 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: etcd-server
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- image: gcr.io/google_containers/etcd:2.0.9
|
||||
name: etcd-container
|
||||
command:
|
||||
- /usr/local/bin/etcd
|
||||
- --name
|
||||
- ${NODE_NAME}
|
||||
- --initial-advertise-peer-urls
|
||||
- http://${NODE_IP}:2380
|
||||
- --listen-peer-urls
|
||||
- http://${NODE_IP}:2380
|
||||
- --advertise-client-urls
|
||||
- http://${NODE_IP}:4001
|
||||
- --listen-client-urls
|
||||
- http://127.0.0.1:4001
|
||||
- --data-dir
|
||||
- /var/etcd/data
|
||||
- --discovery
|
||||
- ${DISCOVERY_TOKEN}
|
||||
ports:
|
||||
- containerPort: 2380
|
||||
hostPort: 2380
|
||||
name: serverport
|
||||
- containerPort: 4001
|
||||
hostPort: 4001
|
||||
name: clientport
|
||||
volumeMounts:
|
||||
- mountPath: /var/etcd
|
||||
name: varetcd
|
||||
- mountPath: /etc/ssl
|
||||
name: etcssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/share/ssl
|
||||
name: usrsharessl
|
||||
readOnly: true
|
||||
- mountPath: /var/ssl
|
||||
name: varssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/ssl
|
||||
name: usrssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/lib/ssl
|
||||
name: usrlibssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/local/openssl
|
||||
name: usrlocalopenssl
|
||||
readOnly: true
|
||||
- mountPath: /etc/openssl
|
||||
name: etcopenssl
|
||||
readOnly: true
|
||||
- mountPath: /etc/pki/tls
|
||||
name: etcpkitls
|
||||
readOnly: true
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /var/etcd/data
|
||||
name: varetcd
|
||||
- hostPath:
|
||||
path: /etc/ssl
|
||||
name: etcssl
|
||||
- hostPath:
|
||||
path: /usr/share/ssl
|
||||
name: usrsharessl
|
||||
- hostPath:
|
||||
path: /var/ssl
|
||||
name: varssl
|
||||
- hostPath:
|
||||
path: /usr/ssl
|
||||
name: usrssl
|
||||
- hostPath:
|
||||
path: /usr/lib/ssl
|
||||
name: usrlibssl
|
||||
- hostPath:
|
||||
path: /usr/local/openssl
|
||||
name: usrlocalopenssl
|
||||
- hostPath:
|
||||
path: /etc/openssl
|
||||
name: etcopenssl
|
||||
- hostPath:
|
||||
path: /etc/pki/tls
|
||||
name: etcpkitls
|
||||
@@ -1,90 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: kube-apiserver
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: kube-apiserver
|
||||
image: gcr.io/google_containers/kube-apiserver:9680e782e08a1a1c94c656190011bd02
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/kube-apiserver --address=127.0.0.1 --etcd-servers=http://127.0.0.1:4001
|
||||
--cloud-provider=gce --admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota
|
||||
--service-cluster-ip-range=10.0.0.0/16 --client-ca-file=/srv/kubernetes/ca.crt
|
||||
--basic-auth-file=/srv/kubernetes/basic_auth.csv --cluster-name=e2e-test-bburns
|
||||
--tls-cert-file=/srv/kubernetes/server.cert --tls-private-key-file=/srv/kubernetes/server.key
|
||||
--secure-port=443 --token-auth-file=/srv/kubernetes/known_tokens.csv --v=2
|
||||
--allow-privileged=False 1>>/var/log/kube-apiserver.log 2>&1
|
||||
ports:
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
name: https
|
||||
- containerPort: 7080
|
||||
hostPort: 7080
|
||||
name: http
|
||||
- containerPort: 8080
|
||||
hostPort: 8080
|
||||
name: local
|
||||
volumeMounts:
|
||||
- mountPath: /srv/kubernetes
|
||||
name: srvkube
|
||||
readOnly: true
|
||||
- mountPath: /var/log/kube-apiserver.log
|
||||
name: logfile
|
||||
- mountPath: /etc/ssl
|
||||
name: etcssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/share/ssl
|
||||
name: usrsharessl
|
||||
readOnly: true
|
||||
- mountPath: /var/ssl
|
||||
name: varssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/ssl
|
||||
name: usrssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/lib/ssl
|
||||
name: usrlibssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/local/openssl
|
||||
name: usrlocalopenssl
|
||||
readOnly: true
|
||||
- mountPath: /etc/openssl
|
||||
name: etcopenssl
|
||||
readOnly: true
|
||||
- mountPath: /etc/pki/tls
|
||||
name: etcpkitls
|
||||
readOnly: true
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /srv/kubernetes
|
||||
name: srvkube
|
||||
- hostPath:
|
||||
path: /var/log/kube-apiserver.log
|
||||
name: logfile
|
||||
- hostPath:
|
||||
path: /etc/ssl
|
||||
name: etcssl
|
||||
- hostPath:
|
||||
path: /usr/share/ssl
|
||||
name: usrsharessl
|
||||
- hostPath:
|
||||
path: /var/ssl
|
||||
name: varssl
|
||||
- hostPath:
|
||||
path: /usr/ssl
|
||||
name: usrssl
|
||||
- hostPath:
|
||||
path: /usr/lib/ssl
|
||||
name: usrlibssl
|
||||
- hostPath:
|
||||
path: /usr/local/openssl
|
||||
name: usrlocalopenssl
|
||||
- hostPath:
|
||||
path: /etc/openssl
|
||||
name: etcopenssl
|
||||
- hostPath:
|
||||
path: /etc/pki/tls
|
||||
name: etcpkitls
|
||||
@@ -1,82 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: kube-controller-manager
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/kube-controller-manager --master=127.0.0.1:8080 --cluster-name=e2e-test-bburns
|
||||
--cluster-cidr=10.245.0.0/16 --allocate-node-cidrs=true --cloud-provider=gce --service-account-private-key-file=/srv/kubernetes/server.key
|
||||
--v=2 1>>/var/log/kube-controller-manager.log 2>&1
|
||||
image: gcr.io/google_containers/kube-controller-manager:fda24638d51a48baa13c35337fcd4793
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 10252
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 1
|
||||
name: kube-controller-manager
|
||||
volumeMounts:
|
||||
- mountPath: /srv/kubernetes
|
||||
name: srvkube
|
||||
readOnly: true
|
||||
- mountPath: /var/log/kube-controller-manager.log
|
||||
name: logfile
|
||||
- mountPath: /etc/ssl
|
||||
name: etcssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/share/ssl
|
||||
name: usrsharessl
|
||||
readOnly: true
|
||||
- mountPath: /var/ssl
|
||||
name: varssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/ssl
|
||||
name: usrssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/lib/ssl
|
||||
name: usrlibssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/local/openssl
|
||||
name: usrlocalopenssl
|
||||
readOnly: true
|
||||
- mountPath: /etc/openssl
|
||||
name: etcopenssl
|
||||
readOnly: true
|
||||
- mountPath: /etc/pki/tls
|
||||
name: etcpkitls
|
||||
readOnly: true
|
||||
hostNetwork: true
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /srv/kubernetes
|
||||
name: srvkube
|
||||
- hostPath:
|
||||
path: /var/log/kube-controller-manager.log
|
||||
name: logfile
|
||||
- hostPath:
|
||||
path: /etc/ssl
|
||||
name: etcssl
|
||||
- hostPath:
|
||||
path: /usr/share/ssl
|
||||
name: usrsharessl
|
||||
- hostPath:
|
||||
path: /var/ssl
|
||||
name: varssl
|
||||
- hostPath:
|
||||
path: /usr/ssl
|
||||
name: usrssl
|
||||
- hostPath:
|
||||
path: /usr/lib/ssl
|
||||
name: usrlibssl
|
||||
- hostPath:
|
||||
path: /usr/local/openssl
|
||||
name: usrlocalopenssl
|
||||
- hostPath:
|
||||
path: /etc/openssl
|
||||
name: etcopenssl
|
||||
- hostPath:
|
||||
path: /etc/pki/tls
|
||||
name: etcpkitls
|
||||
@@ -1,30 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: kube-scheduler
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: kube-scheduler
|
||||
image: gcr.io/google_containers/kube-scheduler:34d0b8f8b31e27937327961528739bc9
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/kube-scheduler --master=127.0.0.1:8080 --v=2 1>>/var/log/kube-scheduler.log
|
||||
2>&1
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 10251
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 1
|
||||
volumeMounts:
|
||||
- mountPath: /var/log/kube-scheduler.log
|
||||
name: logfile
|
||||
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
|
||||
name: default-token-s8ejd
|
||||
readOnly: true
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /var/log/kube-scheduler.log
|
||||
name: logfile
|
||||
@@ -1,9 +0,0 @@
|
||||
check process docker with pidfile /var/run/docker.pid
|
||||
group docker
|
||||
start program = "/etc/init.d/docker start"
|
||||
stop program = "/etc/init.d/docker stop"
|
||||
if does not exist then restart
|
||||
if failed
|
||||
unixsocket /var/run/docker.sock
|
||||
protocol HTTP request "/version"
|
||||
then restart
|
||||
@@ -1,11 +0,0 @@
|
||||
check process kubelet with pidfile /var/run/kubelet.pid
|
||||
group kubelet
|
||||
start program = "/etc/init.d/kubelet start"
|
||||
stop program = "/etc/init.d/kubelet stop"
|
||||
if does not exist then restart
|
||||
if failed
|
||||
host 127.0.0.1
|
||||
port 10255
|
||||
protocol HTTP
|
||||
request "/healthz"
|
||||
then restart
|
||||
@@ -1,43 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: scheduler-master
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: scheduler-elector
|
||||
image: gcr.io/google_containers/podmaster:1.1
|
||||
command:
|
||||
- /podmaster
|
||||
- --etcd-servers=http://127.0.0.1:4001
|
||||
- --key=scheduler
|
||||
- --source-file=/kubernetes/kube-scheduler.manifest
|
||||
- --dest-file=/manifests/kube-scheduler.manifest
|
||||
volumeMounts:
|
||||
- mountPath: /kubernetes
|
||||
name: k8s
|
||||
readOnly: true
|
||||
- mountPath: /manifests
|
||||
name: manifests
|
||||
- name: controller-manager-elector
|
||||
image: gcr.io/google_containers/podmaster:1.1
|
||||
command:
|
||||
- /podmaster
|
||||
- --etcd-servers=http://127.0.0.1:4001
|
||||
- --key=controller
|
||||
- --source-file=/kubernetes/kube-controller-manager.manifest
|
||||
- --dest-file=/manifests/kube-controller-manager.manifest
|
||||
terminationMessagePath: /dev/termination-log
|
||||
volumeMounts:
|
||||
- mountPath: /kubernetes
|
||||
name: k8s
|
||||
readOnly: true
|
||||
- mountPath: /manifests
|
||||
name: manifests
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /srv/kubernetes
|
||||
name: k8s
|
||||
- hostPath:
|
||||
path: /etc/kubernetes/manifests
|
||||
name: manifests
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,12 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: invalid-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: kubernetes-serve-hostname
|
||||
image: gcr.io/google_containers/serve_hostname
|
||||
resources:
|
||||
limits:
|
||||
cpu: "3"
|
||||
memory: 100Mi
|
||||
@@ -1,26 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: LimitRange
|
||||
metadata:
|
||||
name: mylimits
|
||||
spec:
|
||||
limits:
|
||||
- max:
|
||||
cpu: "2"
|
||||
memory: 1Gi
|
||||
min:
|
||||
cpu: 200m
|
||||
memory: 6Mi
|
||||
type: Pod
|
||||
- default:
|
||||
cpu: 300m
|
||||
memory: 200Mi
|
||||
defaultRequest:
|
||||
cpu: 200m
|
||||
memory: 100Mi
|
||||
max:
|
||||
cpu: "2"
|
||||
memory: 1Gi
|
||||
min:
|
||||
cpu: 100m
|
||||
memory: 3Mi
|
||||
type: Container
|
||||
@@ -1,4 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: limit-example
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: valid-pod
|
||||
labels:
|
||||
name: valid-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: kubernetes-serve-hostname
|
||||
image: gcr.io/google_containers/serve_hostname
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"kind": "Namespace",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "development",
|
||||
"labels": {
|
||||
"name": "development"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"kind": "Namespace",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "production",
|
||||
"labels": {
|
||||
"name": "production"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,13 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: LimitRange
|
||||
metadata:
|
||||
name: limits
|
||||
spec:
|
||||
limits:
|
||||
- default:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
defaultRequest:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
type: Container
|
||||
@@ -1,4 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: quota-example
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ResourceQuota
|
||||
metadata:
|
||||
name: quota
|
||||
spec:
|
||||
hard:
|
||||
cpu: "20"
|
||||
memory: 1Gi
|
||||
persistentvolumeclaims: "10"
|
||||
pods: "10"
|
||||
replicationcontrollers: "20"
|
||||
resourcequotas: "1"
|
||||
secrets: "10"
|
||||
services: "5"
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1 +0,0 @@
|
||||
node_modules/
|
||||
@@ -1,92 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: kube-dns-v8
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
version: v8
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
k8s-app: kube-dns
|
||||
version: v8
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
version: v8
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- name: etcd
|
||||
image: gcr.io/google_containers/etcd:2.0.9
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
command:
|
||||
- /usr/local/bin/etcd
|
||||
- -data-dir
|
||||
- /var/etcd/data
|
||||
- -listen-client-urls
|
||||
- http://127.0.0.1:2379,http://127.0.0.1:4001
|
||||
- -advertise-client-urls
|
||||
- http://127.0.0.1:2379,http://127.0.0.1:4001
|
||||
- -initial-cluster-token
|
||||
- skydns-etcd
|
||||
volumeMounts:
|
||||
- name: etcd-storage
|
||||
mountPath: /var/etcd/data
|
||||
- name: kube2sky
|
||||
image: gcr.io/google_containers/kube2sky:1.11
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
args:
|
||||
# command = "/kube2sky"
|
||||
- -domain=kube.local
|
||||
- -kube_master_url=http://kube-00:8080
|
||||
- name: skydns
|
||||
image: gcr.io/google_containers/skydns:2015-03-11-001
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
args:
|
||||
# command = "/skydns"
|
||||
- -machines=http://localhost:4001
|
||||
- -addr=0.0.0.0:53
|
||||
- -domain=kube.local
|
||||
ports:
|
||||
- containerPort: 53
|
||||
name: dns
|
||||
protocol: UDP
|
||||
- containerPort: 53
|
||||
name: dns-tcp
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 5
|
||||
- name: healthz
|
||||
image: gcr.io/google_containers/exechealthz:1.0
|
||||
resources:
|
||||
limits:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
args:
|
||||
- -cmd=nslookup kubernetes.default.svc.kube.local localhost >/dev/null
|
||||
- -port=8080
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
volumes:
|
||||
- name: etcd-storage
|
||||
emptyDir: {}
|
||||
dnsPolicy: Default # Don't use cluster DNS.
|
||||
@@ -1,20 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kube-dns
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "KubeDNS"
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kube-dns
|
||||
clusterIP: 10.1.0.3
|
||||
ports:
|
||||
- name: dns
|
||||
port: 53
|
||||
protocol: UDP
|
||||
- name: dns-tcp
|
||||
port: 53
|
||||
protocol: TCP
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
require('child_process').fork('node_modules/azure-cli/bin/azure', ['login'].concat(process.argv));
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
## This file is used as input to deployment script, which amends it as needed.
|
||||
## More specifically, we need to add peer hosts for each but the elected peer.
|
||||
|
||||
coreos:
|
||||
units:
|
||||
- name: etcd2.service
|
||||
enable: true
|
||||
command: start
|
||||
etcd2:
|
||||
name: '%H'
|
||||
initial-cluster-token: 'etcd-cluster'
|
||||
initial-advertise-peer-urls: 'http://%H:2380'
|
||||
listen-peer-urls: 'http://%H:2380'
|
||||
listen-client-urls: 'http://0.0.0.0:2379,http://0.0.0.0:4001'
|
||||
advertise-client-urls: 'http://%H:2379,http://%H:4001'
|
||||
initial-cluster-state: 'new'
|
||||
update:
|
||||
group: stable
|
||||
reboot-strategy: off
|
||||
-339
@@ -1,339 +0,0 @@
|
||||
## This file is used as input to deployment script, which amends it as needed.
|
||||
## More specifically, we need to add environment files for as many nodes as we
|
||||
## are going to deploy.
|
||||
|
||||
write_files:
|
||||
- path: /opt/bin/curl-retry.sh
|
||||
permissions: '0755'
|
||||
owner: root
|
||||
content: |
|
||||
#!/bin/sh -x
|
||||
until curl $@
|
||||
do sleep 1
|
||||
done
|
||||
|
||||
coreos:
|
||||
update:
|
||||
group: stable
|
||||
reboot-strategy: off
|
||||
units:
|
||||
- name: systemd-networkd-wait-online.service
|
||||
drop-ins:
|
||||
- name: 50-check-github-is-reachable.conf
|
||||
content: |
|
||||
[Service]
|
||||
ExecStart=/bin/sh -x -c \
|
||||
'until curl --silent --fail https://status.github.com/api/status.json | grep -q \"good\"; do sleep 2; done'
|
||||
|
||||
- name: docker.service
|
||||
drop-ins:
|
||||
- name: 50-weave-kubernetes.conf
|
||||
content: |
|
||||
[Service]
|
||||
Environment=DOCKER_OPTS='--bridge="weave" -r="false"'
|
||||
|
||||
- name: weave-network.target
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Weave Network Setup Complete
|
||||
Documentation=man:systemd.special(7)
|
||||
RefuseManualStart=no
|
||||
After=network-online.target
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=kubernetes-master.target
|
||||
WantedBy=kubernetes-node.target
|
||||
|
||||
- name: kubernetes-master.target
|
||||
enable: true
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Cluster Master
|
||||
Documentation=http://kubernetes.io/
|
||||
RefuseManualStart=no
|
||||
After=weave-network.target
|
||||
Requires=weave-network.target
|
||||
ConditionHost=kube-00
|
||||
Wants=kube-apiserver.service
|
||||
Wants=kube-scheduler.service
|
||||
Wants=kube-controller-manager.service
|
||||
Wants=kube-proxy.service
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
- name: kubernetes-node.target
|
||||
enable: true
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Cluster Node
|
||||
Documentation=http://kubernetes.io/
|
||||
RefuseManualStart=no
|
||||
After=weave-network.target
|
||||
Requires=weave-network.target
|
||||
ConditionHost=!kube-00
|
||||
Wants=kube-proxy.service
|
||||
Wants=kubelet.service
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
- name: 10-weave.network
|
||||
runtime: false
|
||||
content: |
|
||||
[Match]
|
||||
Type=bridge
|
||||
Name=weave*
|
||||
[Network]
|
||||
|
||||
- name: install-weave.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=network-online.target
|
||||
Before=weave.service
|
||||
Before=weave-helper.service
|
||||
Before=docker.service
|
||||
Description=Install Weave
|
||||
Documentation=http://docs.weave.works/
|
||||
Requires=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/mkdir -p /opt/bin/
|
||||
ExecStartPre=/opt/bin/curl-retry.sh \
|
||||
--silent \
|
||||
--location \
|
||||
https://github.com/weaveworks/weave/releases/download/latest_release/weave \
|
||||
--output /opt/bin/weave
|
||||
ExecStartPre=/opt/bin/curl-retry.sh \
|
||||
--silent \
|
||||
--location \
|
||||
https://raw.github.com/errordeveloper/weave-demos/master/poseidon/weave-helper \
|
||||
--output /opt/bin/weave-helper
|
||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/weave
|
||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/weave-helper
|
||||
ExecStart=/bin/echo Weave Installed
|
||||
[Install]
|
||||
WantedBy=weave-network.target
|
||||
WantedBy=weave.service
|
||||
|
||||
- name: weave-helper.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=install-weave.service
|
||||
After=docker.service
|
||||
Description=Weave Network Router
|
||||
Documentation=http://docs.weave.works/
|
||||
Requires=docker.service
|
||||
Requires=install-weave.service
|
||||
[Service]
|
||||
ExecStart=/opt/bin/weave-helper
|
||||
Restart=always
|
||||
[Install]
|
||||
WantedBy=weave-network.target
|
||||
|
||||
- name: weave.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=install-weave.service
|
||||
After=docker.service
|
||||
Description=Weave Network Router
|
||||
Documentation=http://docs.weave.works/
|
||||
Requires=docker.service
|
||||
Requires=install-weave.service
|
||||
[Service]
|
||||
TimeoutStartSec=0
|
||||
EnvironmentFile=/etc/weave.%H.env
|
||||
ExecStartPre=/opt/bin/weave setup
|
||||
ExecStartPre=/opt/bin/weave launch $WEAVE_PEERS
|
||||
ExecStart=/usr/bin/docker attach weave
|
||||
Restart=on-failure
|
||||
Restart=always
|
||||
ExecStop=/opt/bin/weave stop
|
||||
[Install]
|
||||
WantedBy=weave-network.target
|
||||
|
||||
- name: weave-create-bridge.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=network.target
|
||||
After=install-weave.service
|
||||
Before=weave.service
|
||||
Before=docker.service
|
||||
Requires=network.target
|
||||
Requires=install-weave.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
EnvironmentFile=/etc/weave.%H.env
|
||||
ExecStart=/opt/bin/weave --local create-bridge
|
||||
ExecStart=/usr/bin/ip addr add dev weave $BRIDGE_ADDRESS_CIDR
|
||||
ExecStart=/usr/bin/ip route add $BREAKOUT_ROUTE dev weave scope link
|
||||
ExecStart=/usr/bin/ip route add 224.0.0.0/4 dev weave
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=weave-network.target
|
||||
|
||||
- name: install-kubernetes.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=network-online.target
|
||||
Before=kube-apiserver.service
|
||||
Before=kube-controller-manager.service
|
||||
Before=kubelet.service
|
||||
Before=kube-proxy.service
|
||||
Description=Download Kubernetes Binaries
|
||||
Documentation=http://kubernetes.io/
|
||||
Requires=network-online.target
|
||||
[Service]
|
||||
Environment=KUBE_RELEASE_TARBALL=https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v1.0.1/kubernetes.tar.gz
|
||||
ExecStartPre=/bin/mkdir -p /opt/
|
||||
ExecStart=/opt/bin/curl-retry.sh --silent --location $KUBE_RELEASE_TARBALL --output /tmp/kubernetes.tgz
|
||||
ExecStart=/bin/tar xzvf /tmp/kubernetes.tgz -C /tmp/
|
||||
ExecStart=/bin/tar xzvf /tmp/kubernetes/server/kubernetes-server-linux-amd64.tar.gz -C /opt
|
||||
ExecStartPost=/bin/chmod o+rx -R /opt/kubernetes
|
||||
ExecStartPost=/bin/ln -s /opt/kubernetes/server/bin/kubectl /opt/bin/
|
||||
ExecStartPost=/bin/mv /tmp/kubernetes/examples/guestbook /home/core/guestbook-example
|
||||
ExecStartPost=/bin/chown core. -R /home/core/guestbook-example
|
||||
ExecStartPost=/bin/rm -rf /tmp/kubernetes
|
||||
ExecStartPost=/bin/sed 's/# type: LoadBalancer/type: NodePort/' -i /home/core/guestbook-example/frontend-service.yaml
|
||||
RemainAfterExit=yes
|
||||
Type=oneshot
|
||||
[Install]
|
||||
WantedBy=kubernetes-master.target
|
||||
WantedBy=kubernetes-node.target
|
||||
|
||||
- name: kube-apiserver.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=install-kubernetes.service
|
||||
Before=kube-controller-manager.service
|
||||
Before=kube-scheduler.service
|
||||
ConditionFileIsExecutable=/opt/kubernetes/server/bin/kube-apiserver
|
||||
Description=Kubernetes API Server
|
||||
Documentation=http://kubernetes.io/
|
||||
Wants=install-kubernetes.service
|
||||
ConditionHost=kube-00
|
||||
[Service]
|
||||
ExecStart=/opt/kubernetes/server/bin/kube-apiserver \
|
||||
--address=0.0.0.0 \
|
||||
--port=8080 \
|
||||
$ETCD_SERVERS \
|
||||
--service-cluster-ip-range=10.1.0.0/16 \
|
||||
--logtostderr=true --v=3
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
[Install]
|
||||
WantedBy=kubernetes-master.target
|
||||
|
||||
- name: kube-scheduler.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=kube-apiserver.service
|
||||
After=install-kubernetes.service
|
||||
ConditionFileIsExecutable=/opt/kubernetes/server/bin/kube-scheduler
|
||||
Description=Kubernetes Scheduler
|
||||
Documentation=http://kubernetes.io/
|
||||
Wants=kube-apiserver.service
|
||||
ConditionHost=kube-00
|
||||
[Service]
|
||||
ExecStart=/opt/kubernetes/server/bin/kube-scheduler \
|
||||
--logtostderr=true \
|
||||
--master=127.0.0.1:8080
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
[Install]
|
||||
WantedBy=kubernetes-master.target
|
||||
|
||||
- name: kube-controller-manager.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=install-kubernetes.service
|
||||
After=kube-apiserver.service
|
||||
ConditionFileIsExecutable=/opt/kubernetes/server/bin/kube-controller-manager
|
||||
Description=Kubernetes Controller Manager
|
||||
Documentation=http://kubernetes.io/
|
||||
Wants=kube-apiserver.service
|
||||
Wants=install-kubernetes.service
|
||||
ConditionHost=kube-00
|
||||
[Service]
|
||||
ExecStart=/opt/kubernetes/server/bin/kube-controller-manager \
|
||||
--master=127.0.0.1:8080 \
|
||||
--logtostderr=true
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
[Install]
|
||||
WantedBy=kubernetes-master.target
|
||||
|
||||
- name: kubelet.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=install-kubernetes.service
|
||||
ConditionFileIsExecutable=/opt/kubernetes/server/bin/kubelet
|
||||
Description=Kubernetes Kubelet
|
||||
Documentation=http://kubernetes.io/
|
||||
Wants=install-kubernetes.service
|
||||
ConditionHost=!kube-00
|
||||
[Service]
|
||||
ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests/
|
||||
ExecStart=/opt/kubernetes/server/bin/kubelet \
|
||||
--address=0.0.0.0 \
|
||||
--port=10250 \
|
||||
--hostname-override=%H \
|
||||
--api-servers=http://kube-00:8080 \
|
||||
--logtostderr=true \
|
||||
--cluster-dns=10.1.0.3 \
|
||||
--cluster-domain=kube.local \
|
||||
--config=/etc/kubernetes/manifests/
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
[Install]
|
||||
WantedBy=kubernetes-node.target
|
||||
|
||||
- name: kube-proxy.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=install-kubernetes.service
|
||||
ConditionFileIsExecutable=/opt/kubernetes/server/bin/kube-proxy
|
||||
Description=Kubernetes Proxy
|
||||
Documentation=http://kubernetes.io/
|
||||
Wants=install-kubernetes.service
|
||||
[Service]
|
||||
ExecStart=/opt/kubernetes/server/bin/kube-proxy \
|
||||
--master=http://kube-00:8080 \
|
||||
--logtostderr=true
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
[Install]
|
||||
WantedBy=kubernetes-master.target
|
||||
WantedBy=kubernetes-node.target
|
||||
|
||||
- name: kube-create-addons.service
|
||||
enable: true
|
||||
content: |
|
||||
[Unit]
|
||||
After=install-kubernetes.service
|
||||
ConditionFileIsExecutable=/opt/kubernetes/server/bin/kubectl
|
||||
ConditionPathIsDirectory=/etc/kubernetes/addons/
|
||||
ConditionHost=kube-00
|
||||
Description=Kubernetes Addons
|
||||
Documentation=http://kubernetes.io/
|
||||
Wants=install-kubernetes.service
|
||||
Wants=kube-apiserver.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
ExecStart=/opt/kubernetes/server/bin/kubectl create -f /etc/kubernetes/addons/
|
||||
SuccessExitStatus=1
|
||||
[Install]
|
||||
WantedBy=kubernetes-master.target
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var azure = require('./lib/azure_wrapper.js');
|
||||
var kube = require('./lib/deployment_logic/kubernetes.js');
|
||||
|
||||
azure.create_config('kube', { 'etcd': 3, 'kube': 3 });
|
||||
|
||||
azure.run_task_queue([
|
||||
azure.queue_default_network(),
|
||||
azure.queue_storage_if_needed(),
|
||||
azure.queue_machines('etcd', 'stable',
|
||||
kube.create_etcd_cloud_config),
|
||||
azure.queue_machines('kube', 'stable',
|
||||
kube.create_node_cloud_config),
|
||||
]);
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var azure = require('./lib/azure_wrapper.js');
|
||||
|
||||
azure.destroy_cluster(process.argv[2]);
|
||||
|
||||
console.log('The cluster had been destroyed, you can delete the state file now.');
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2014 The Kubernetes Authors All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
set -e
|
||||
|
||||
[ ! -z $1 ] || (echo Usage: $0 ssh_conf; exit 1)
|
||||
|
||||
fe_port=$(ssh -F $1 kube-00 \
|
||||
"/opt/bin/kubectl get -o template --template='{{(index .spec.ports 0).nodePort}}' services frontend -L name=frontend" \
|
||||
)
|
||||
|
||||
echo "Guestbook app is on port $fe_port, will map it to port 80 on kube-00"
|
||||
|
||||
./node_modules/.bin/azure vm endpoint create kube-00 80 $fe_port
|
||||
|
||||
./node_modules/.bin/azure vm endpoint show kube-00 tcp-80-${fe_port}
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
{% include {{page.path | replace: page.version, 'docs'}} %}
|
||||
@@ -1,271 +0,0 @@
|
||||
var _ = require('underscore');
|
||||
|
||||
var fs = require('fs');
|
||||
var cp = require('child_process');
|
||||
|
||||
var yaml = require('js-yaml');
|
||||
|
||||
var openssl = require('openssl-wrapper');
|
||||
|
||||
var clr = require('colors');
|
||||
var inspect = require('util').inspect;
|
||||
|
||||
var util = require('./util.js');
|
||||
|
||||
var coreos_image_ids = {
|
||||
'stable': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Stable-717.3.0',
|
||||
'beta': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Beta-723.3.0', // untested
|
||||
'alpha': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Alpha-745.1.0' // untested
|
||||
};
|
||||
|
||||
var conf = {};
|
||||
|
||||
var hosts = {
|
||||
collection: [],
|
||||
ssh_port_counter: 2200,
|
||||
};
|
||||
|
||||
var task_queue = [];
|
||||
|
||||
exports.run_task_queue = function (dummy) {
|
||||
var tasks = {
|
||||
todo: task_queue,
|
||||
done: [],
|
||||
};
|
||||
|
||||
var pop_task = function() {
|
||||
console.log(clr.yellow('azure_wrapper/task:'), clr.grey(inspect(tasks)));
|
||||
var ret = {};
|
||||
ret.current = tasks.todo.shift();
|
||||
ret.remaining = tasks.todo.length;
|
||||
return ret;
|
||||
};
|
||||
|
||||
(function iter (task) {
|
||||
if (task.current === undefined) {
|
||||
if (conf.destroying === undefined) {
|
||||
create_ssh_conf();
|
||||
save_state();
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
if (task.current.length !== 0) {
|
||||
console.log(clr.yellow('azure_wrapper/exec:'), clr.blue(inspect(task.current)));
|
||||
cp.fork('node_modules/azure-cli/bin/azure', task.current)
|
||||
.on('exit', function (code, signal) {
|
||||
tasks.done.push({
|
||||
code: code,
|
||||
signal: signal,
|
||||
what: task.current.join(' '),
|
||||
remaining: task.remaining,
|
||||
});
|
||||
if (code !== 0 && conf.destroying === undefined) {
|
||||
console.log(clr.red('azure_wrapper/fail: Exiting due to an error.'));
|
||||
save_state();
|
||||
console.log(clr.cyan('azure_wrapper/info: You probably want to destroy and re-run.'));
|
||||
process.abort();
|
||||
} else {
|
||||
iter(pop_task());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
iter(pop_task());
|
||||
}
|
||||
}
|
||||
})(pop_task());
|
||||
};
|
||||
|
||||
var save_state = function () {
|
||||
var file_name = util.join_output_file_path(conf.name, 'deployment.yml');
|
||||
try {
|
||||
conf.hosts = hosts.collection;
|
||||
fs.writeFileSync(file_name, yaml.safeDump(conf));
|
||||
console.log(clr.yellow('azure_wrapper/info: Saved state into `%s`'), file_name);
|
||||
} catch (e) {
|
||||
console.log(clr.red(e));
|
||||
}
|
||||
};
|
||||
|
||||
var load_state = function (file_name) {
|
||||
try {
|
||||
conf = yaml.safeLoad(fs.readFileSync(file_name, 'utf8'));
|
||||
console.log(clr.yellow('azure_wrapper/info: Loaded state from `%s`'), file_name);
|
||||
return conf;
|
||||
} catch (e) {
|
||||
console.log(clr.red(e));
|
||||
}
|
||||
};
|
||||
|
||||
var create_ssh_key = function (prefix) {
|
||||
var opts = {
|
||||
x509: true,
|
||||
nodes: true,
|
||||
newkey: 'rsa:2048',
|
||||
subj: '/O=Weaveworks, Inc./L=London/C=GB/CN=weave.works',
|
||||
keyout: util.join_output_file_path(prefix, 'ssh.key'),
|
||||
out: util.join_output_file_path(prefix, 'ssh.pem'),
|
||||
};
|
||||
openssl.exec('req', opts, function (err, buffer) {
|
||||
if (err) console.log(clr.red(err));
|
||||
fs.chmod(opts.keyout, '0600', function (err) {
|
||||
if (err) console.log(clr.red(err));
|
||||
});
|
||||
});
|
||||
return {
|
||||
key: opts.keyout,
|
||||
pem: opts.out,
|
||||
}
|
||||
}
|
||||
|
||||
var create_ssh_conf = function () {
|
||||
var file_name = util.join_output_file_path(conf.name, 'ssh_conf');
|
||||
var ssh_conf_head = [
|
||||
"Host *",
|
||||
"\tHostname " + conf.resources['service'] + ".cloudapp.net",
|
||||
"\tUser core",
|
||||
"\tCompression yes",
|
||||
"\tLogLevel FATAL",
|
||||
"\tStrictHostKeyChecking no",
|
||||
"\tUserKnownHostsFile /dev/null",
|
||||
"\tIdentitiesOnly yes",
|
||||
"\tIdentityFile " + conf.resources['ssh_key']['key'],
|
||||
"\n",
|
||||
];
|
||||
|
||||
fs.writeFileSync(file_name, ssh_conf_head.concat(_.map(hosts.collection, function (host) {
|
||||
return _.template("Host <%= name %>\n\tPort <%= port %>\n")(host);
|
||||
})).join('\n'));
|
||||
console.log(clr.yellow('azure_wrapper/info:'), clr.green('Saved SSH config, you can use it like so: `ssh -F ', file_name, '<hostname>`'));
|
||||
console.log(clr.yellow('azure_wrapper/info:'), clr.green('The hosts in this deployment are:\n'), _.map(hosts.collection, function (host) { return host.name; }));
|
||||
};
|
||||
|
||||
var get_location = function () {
|
||||
if (process.env['AZ_AFFINITY']) {
|
||||
return '--affinity-group=' + process.env['AZ_AFFINITY'];
|
||||
} else if (process.env['AZ_LOCATION']) {
|
||||
return '--location=' + process.env['AZ_LOCATION'];
|
||||
} else {
|
||||
return '--location=West Europe';
|
||||
}
|
||||
}
|
||||
var get_vm_size = function () {
|
||||
if (process.env['AZ_VM_SIZE']) {
|
||||
return '--vm-size=' + process.env['AZ_VM_SIZE'];
|
||||
} else {
|
||||
return '--vm-size=Small';
|
||||
}
|
||||
}
|
||||
|
||||
exports.queue_default_network = function () {
|
||||
task_queue.push([
|
||||
'network', 'vnet', 'create',
|
||||
get_location(),
|
||||
'--address-space=172.16.0.0',
|
||||
conf.resources['vnet'],
|
||||
]);
|
||||
}
|
||||
|
||||
exports.queue_storage_if_needed = function() {
|
||||
if (!process.env['AZURE_STORAGE_ACCOUNT']) {
|
||||
conf.resources['storage_account'] = util.rand_suffix;
|
||||
task_queue.push([
|
||||
'storage', 'account', 'create',
|
||||
'--type=LRS',
|
||||
get_location(),
|
||||
conf.resources['storage_account'],
|
||||
]);
|
||||
process.env['AZURE_STORAGE_ACCOUNT'] = conf.resources['storage_account'];
|
||||
} else {
|
||||
// Preserve it for resizing, so we don't create a new one by accedent,
|
||||
// when the environment variable is unset
|
||||
conf.resources['storage_account'] = process.env['AZURE_STORAGE_ACCOUNT'];
|
||||
}
|
||||
};
|
||||
|
||||
exports.queue_machines = function (name_prefix, coreos_update_channel, cloud_config_creator) {
|
||||
var x = conf.nodes[name_prefix];
|
||||
var vm_create_base_args = [
|
||||
'vm', 'create',
|
||||
get_location(),
|
||||
get_vm_size(),
|
||||
'--connect=' + conf.resources['service'],
|
||||
'--virtual-network-name=' + conf.resources['vnet'],
|
||||
'--no-ssh-password',
|
||||
'--ssh-cert=' + conf.resources['ssh_key']['pem'],
|
||||
];
|
||||
|
||||
var cloud_config = cloud_config_creator(x, conf);
|
||||
|
||||
var next_host = function (n) {
|
||||
hosts.ssh_port_counter += 1;
|
||||
var host = { name: util.hostname(n, name_prefix), port: hosts.ssh_port_counter };
|
||||
if (cloud_config instanceof Array) {
|
||||
host.cloud_config_file = cloud_config[n];
|
||||
} else {
|
||||
host.cloud_config_file = cloud_config;
|
||||
}
|
||||
hosts.collection.push(host);
|
||||
return _.map([
|
||||
"--vm-name=<%= name %>",
|
||||
"--ssh=<%= port %>",
|
||||
"--custom-data=<%= cloud_config_file %>",
|
||||
], function (arg) { return _.template(arg)(host); });
|
||||
};
|
||||
|
||||
task_queue = task_queue.concat(_(x).times(function (n) {
|
||||
if (conf.resizing && n < conf.old_size) {
|
||||
return [];
|
||||
} else {
|
||||
return vm_create_base_args.concat(next_host(n), [
|
||||
coreos_image_ids[coreos_update_channel], 'core',
|
||||
]);
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
exports.create_config = function (name, nodes) {
|
||||
conf = {
|
||||
name: name,
|
||||
nodes: nodes,
|
||||
weave_salt: util.rand_string(),
|
||||
resources: {
|
||||
vnet: [name, 'internal-vnet', util.rand_suffix].join('-'),
|
||||
service: [name, util.rand_suffix].join('-'),
|
||||
ssh_key: create_ssh_key(name),
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
exports.destroy_cluster = function (state_file) {
|
||||
load_state(state_file);
|
||||
if (conf.hosts === undefined) {
|
||||
console.log(clr.red('azure_wrapper/fail: Nothing to delete.'));
|
||||
process.abort();
|
||||
}
|
||||
|
||||
conf.destroying = true;
|
||||
task_queue = _.map(conf.hosts, function (host) {
|
||||
return ['vm', 'delete', '--quiet', '--blob-delete', host.name];
|
||||
});
|
||||
|
||||
task_queue.push(['network', 'vnet', 'delete', '--quiet', conf.resources['vnet']]);
|
||||
task_queue.push(['storage', 'account', 'delete', '--quiet', conf.resources['storage_account']]);
|
||||
|
||||
exports.run_task_queue();
|
||||
};
|
||||
|
||||
exports.load_state_for_resizing = function (state_file, node_type, new_nodes) {
|
||||
load_state(state_file);
|
||||
if (conf.hosts === undefined) {
|
||||
console.log(clr.red('azure_wrapper/fail: Nothing to look at.'));
|
||||
process.abort();
|
||||
}
|
||||
conf.resizing = true;
|
||||
conf.old_size = conf.nodes[node_type];
|
||||
conf.old_state_file = state_file;
|
||||
conf.nodes[node_type] += new_nodes;
|
||||
hosts.collection = conf.hosts;
|
||||
hosts.ssh_port_counter += conf.hosts.length;
|
||||
process.env['AZURE_STORAGE_ACCOUNT'] = conf.resources['storage_account'];
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
var _ = require('underscore');
|
||||
var fs = require('fs');
|
||||
var yaml = require('js-yaml');
|
||||
var colors = require('colors/safe');
|
||||
|
||||
var write_cloud_config_from_object = function (data, output_file) {
|
||||
try {
|
||||
fs.writeFileSync(output_file, [
|
||||
'#cloud-config',
|
||||
yaml.safeDump(data),
|
||||
].join("\n"));
|
||||
return output_file;
|
||||
} catch (e) {
|
||||
console.log(colors.red(e));
|
||||
}
|
||||
};
|
||||
|
||||
exports.generate_environment_file_entry_from_object = function (hostname, environ) {
|
||||
var data = {
|
||||
hostname: hostname,
|
||||
environ_array: _.map(environ, function (value, key) {
|
||||
return [key.toUpperCase(), JSON.stringify(value.toString())].join('=');
|
||||
}),
|
||||
};
|
||||
|
||||
return {
|
||||
permissions: '0600',
|
||||
owner: 'root',
|
||||
content: _.template("<%= environ_array.join('\\n') %>\n")(data),
|
||||
path: _.template("/etc/weave.<%= hostname %>.env")(data),
|
||||
};
|
||||
};
|
||||
|
||||
exports.process_template = function (input_file, output_file, processor) {
|
||||
var data = {};
|
||||
try {
|
||||
data = yaml.safeLoad(fs.readFileSync(input_file, 'utf8'));
|
||||
} catch (e) {
|
||||
console.log(colors.red(e));
|
||||
}
|
||||
return write_cloud_config_from_object(processor(_.clone(data)), output_file);
|
||||
};
|
||||
|
||||
exports.write_files_from = function (local_dir, remote_dir) {
|
||||
try {
|
||||
return _.map(fs.readdirSync(local_dir), function (fn) {
|
||||
return {
|
||||
path: [remote_dir, fn].join('/'),
|
||||
owner: 'root',
|
||||
permissions: '0640',
|
||||
encoding: 'base64',
|
||||
content: fs.readFileSync([local_dir, fn].join('/')).toString('base64'),
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(colors.red(e));
|
||||
}
|
||||
};
|
||||
@@ -1,77 +0,0 @@
|
||||
var _ = require('underscore');
|
||||
_.mixin(require('underscore.string').exports());
|
||||
|
||||
var util = require('../util.js');
|
||||
var cloud_config = require('../cloud_config.js');
|
||||
|
||||
|
||||
etcd_initial_cluster_conf_self = function (conf) {
|
||||
var port = '2380';
|
||||
|
||||
var data = {
|
||||
nodes: _(conf.nodes.etcd).times(function (n) {
|
||||
var host = util.hostname(n, 'etcd');
|
||||
return [host, [host, port].join(':')].join('=http://');
|
||||
}),
|
||||
};
|
||||
|
||||
return {
|
||||
'name': 'etcd2.service',
|
||||
'drop-ins': [{
|
||||
'name': '50-etcd-initial-cluster.conf',
|
||||
'content': _.template("[Service]\nEnvironment=ETCD_INITIAL_CLUSTER=<%= nodes.join(',') %>\n")(data),
|
||||
}],
|
||||
};
|
||||
};
|
||||
|
||||
etcd_initial_cluster_conf_kube = function (conf) {
|
||||
var port = '4001';
|
||||
|
||||
var data = {
|
||||
nodes: _(conf.nodes.etcd).times(function (n) {
|
||||
var host = util.hostname(n, 'etcd');
|
||||
return 'http://' + [host, port].join(':');
|
||||
}),
|
||||
};
|
||||
|
||||
return {
|
||||
'name': 'kube-apiserver.service',
|
||||
'drop-ins': [{
|
||||
'name': '50-etcd-initial-cluster.conf',
|
||||
'content': _.template("[Service]\nEnvironment=ETCD_SERVERS=--etcd-servers=<%= nodes.join(',') %>\n")(data),
|
||||
}],
|
||||
};
|
||||
};
|
||||
|
||||
exports.create_etcd_cloud_config = function (node_count, conf) {
|
||||
var input_file = './cloud_config_templates/kubernetes-cluster-etcd-node-template.yml';
|
||||
var output_file = util.join_output_file_path('kubernetes-cluster-etcd-nodes', 'generated.yml');
|
||||
|
||||
return cloud_config.process_template(input_file, output_file, function(data) {
|
||||
data.coreos.units.push(etcd_initial_cluster_conf_self(conf));
|
||||
return data;
|
||||
});
|
||||
};
|
||||
|
||||
exports.create_node_cloud_config = function (node_count, conf) {
|
||||
var elected_node = 0;
|
||||
|
||||
var input_file = './cloud_config_templates/kubernetes-cluster-main-nodes-template.yml';
|
||||
var output_file = util.join_output_file_path('kubernetes-cluster-main-nodes', 'generated.yml');
|
||||
|
||||
var make_node_config = function (n) {
|
||||
return cloud_config.generate_environment_file_entry_from_object(util.hostname(n, 'kube'), {
|
||||
weave_password: conf.weave_salt,
|
||||
weave_peers: n === elected_node ? "" : util.hostname(elected_node, 'kube'),
|
||||
breakout_route: util.ipv4([10, 2, 0, 0], 16),
|
||||
bridge_address_cidr: util.ipv4([10, 2, n, 1], 24),
|
||||
});
|
||||
};
|
||||
|
||||
var write_files_extra = cloud_config.write_files_from('addons', '/etc/kubernetes/addons');
|
||||
return cloud_config.process_template(input_file, output_file, function(data) {
|
||||
data.write_files = data.write_files.concat(_(node_count).times(make_node_config), write_files_extra);
|
||||
data.coreos.units.push(etcd_initial_cluster_conf_kube(conf));
|
||||
return data;
|
||||
});
|
||||
};
|
||||
@@ -1,33 +0,0 @@
|
||||
var _ = require('underscore');
|
||||
_.mixin(require('underscore.string').exports());
|
||||
|
||||
exports.ipv4 = function (ocets, prefix) {
|
||||
return {
|
||||
ocets: ocets,
|
||||
prefix: prefix,
|
||||
toString: function () {
|
||||
return [ocets.join('.'), prefix].join('/');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.hostname = function hostname (n, prefix) {
|
||||
return _.template("<%= pre %>-<%= seq %>")({
|
||||
pre: prefix || 'core',
|
||||
seq: _.pad(n, 2, '0'),
|
||||
});
|
||||
};
|
||||
|
||||
exports.rand_string = function () {
|
||||
var crypto = require('crypto');
|
||||
var shasum = crypto.createHash('sha256');
|
||||
shasum.update(crypto.randomBytes(256));
|
||||
return shasum.digest('hex');
|
||||
};
|
||||
|
||||
|
||||
exports.rand_suffix = exports.rand_string().substring(50);
|
||||
|
||||
exports.join_output_file_path = function(prefix, suffix) {
|
||||
return './output/' + [prefix, exports.rand_suffix, suffix].join('_');
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user