Skip to content

Commit

Permalink
Merge with v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiezhang committed Jul 7, 2017
2 parents 0506730 + 8a47cbd commit 549a4c2
Show file tree
Hide file tree
Showing 1,748 changed files with 1,294,556 additions and 659 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ _input/
test/user.env
user.env
test/acs-engine-test/acs-engine-test
.editorconfig

test/acs-engine-test/acs-engine-test.exe
pkg/operations/junit.xml
pkg/operations/kubernetesupgrade/junit.xml
pkg/operations/kubernetesupgrade/junit.xml
pkg/acsengine/templates.go
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN mkdir /tmp/godeb \
&& rm -rf /tmp/godeb

# See: https://github.com/Azure/azure-cli/blob/master/packaged_releases/bundled/README.md#using-the-bundled-installer
ENV AZURE_CLI_BUNDLE_VERSION 0.2.9
ENV AZURE_CLI_BUNDLE_VERSION 0.2.10-1
RUN mkdir /tmp/azurecli \
&& curl "https://azurecliprod.blob.core.windows.net/bundled/azure-cli_bundle_${AZURE_CLI_BUNDLE_VERSION}.tar.gz" > /tmp/azurecli/azure-cli_bundle.tar.gz \
&& (cd /tmp/azurecli \
Expand Down
5 changes: 3 additions & 2 deletions cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,12 @@ func (dc *deployCmd) run() error {
if template, err = acsengine.PrettyPrintArmTemplate(template); err != nil {
log.Fatalf("error pretty printing template: %s \n", err.Error())
}
if parameters, err = acsengine.PrettyPrintJSON(parameters); err != nil {
var parametersFile string
if parametersFile, err = acsengine.BuildAzureParametersFile(parameters); err != nil {
log.Fatalf("error pretty printing template parameters: %s \n", err.Error())
}

if err = acsengine.WriteArtifacts(dc.containerService, dc.apiVersion, template, parameters, dc.outputDirectory, certsgenerated, dc.parametersOnly); err != nil {
if err = acsengine.WriteArtifacts(dc.containerService, dc.apiVersion, template, parametersFile, dc.outputDirectory, certsgenerated, dc.parametersOnly); err != nil {
log.Fatalf("error writing artifacts: %s \n", err.Error())
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (gc *generateCmd) run() error {
if template, err = acsengine.PrettyPrintArmTemplate(template); err != nil {
log.Fatalf("error pretty printing template: %s \n", err.Error())
}
if parameters, err = acsengine.PrettyPrintJSON(parameters); err != nil {
if parameters, err = acsengine.BuildAzureParametersFile(parameters); err != nil {
log.Fatalf("error pretty printing template parameters: %s \n", err.Error())
}
}
Expand Down
10 changes: 9 additions & 1 deletion docs/acsengine.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ This means that you can edit your source code normally in your favorite editor o
machine, while still being able to compile and test inside of the Docker container (the
same environment used in our Continuous Integration system).

When the execution of `devenv.{ps1,sh}` completes, you should find the console logged into the container. As a final step, in order to get the `acs-engine` tool ready, you should build the sources with:
When the execution of `devenv.{ps1,sh}` completes, you should find the console logged into the container.

Now we need to do a one-time call to setup the prerequisites.

```
make prereqs
```

As a final step, in order to get the `acs-engine` tool ready, you should build the sources with:

```
make build
Expand Down
1 change: 1 addition & 0 deletions docs/clusterdefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Here are the valid values for the orchestrator types:
|kubernetesImageBase|no|This specifies the image of kubernetes to use for the cluster.|
|networkPolicy|no|Specifies the network policy tool for the cluster. Valid values are:<br>`none` (default), which won't enforce any network policy,<br>`azure` for applying Azure VNET network policy,<br>`calico` for Calico network policy for clusters with Linux agents only.<br>See [network policy examples](../examples/networkpolicy) for more information.|
|clusterSubnet|no|The IP subnet used for allocating IP addresses for pod network interfaces. The subnet must be in the VNET address space. Default value is 10.244.0.0/16.|
|dockerBridgeSubnet|no|The specific IP and subnet used for allocating IP addresses for the docker bridge network created on the kubernetes master and agents. Default value is 172.17.0.1/16. This value is used to configure the docker daemon using the [--bip flag](https://docs.docker.com/engine/userguide/networking/default_network/custom-docker0).|

### masterProfile
`masterProfile` describes the settings for master configuration.
Expand Down
10 changes: 8 additions & 2 deletions docs/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ After completing this walkthrough you will know how to:

## Troubleshooting

### Scaling up or down

Scaling your cluster up or down requires different parameters and template than the create. More details here [Scale up](../examples/scale-up/README.md)

If your cluster is not reachable, you can run the following command to check for common failures.
Expand All @@ -195,12 +197,16 @@ read and **write** permissions to the target Subscription.

`Nov 10 16:35:22 k8s-master-43D6F832-0 docker[3177]: E1110 16:35:22.840688 3201 kubelet_node_status.go:69] Unable to construct api.Node object for kubelet: failed to get external ID from cloud provider: autorest#WithErrorUnlessStatusCode: POST https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/token?api-version=1.0 failed with 400 Bad Request: StatusCode=400`

3. [Link](serviceprincipal.md) to documentation on how to create/configure a service principal for an ACS-Engine Kubernetes cluster.
3. [Link](serviceprincipal.md) to documentation on how to create/configure a service principal for an ACS-Engine Kubernetes cluster.

### Managed Disks

While [Managed disks](../examples/disks-managed/README.md) are supported for the node OS disks, they are currently not supported for persistent volumes. See https://github.com/kubernetes/kubernetes/pull/46360 for details.

## Learning More

Here are recommended links to learn more about Kubernetes:

1. [Kubernetes Bootcamp](https://kubernetesbootcamp.github.io/kubernetes-bootcamp/index.html) - shows you how to deploy, scale, update, and debug containerized applications.
2. [Kubernetes Userguide](http://kubernetes.io/docs/user-guide/) - provides information on running programs in an existing Kubernetes cluster.
3. [Kubernetes Examples](https://github.com/kubernetes/kubernetes/tree/master/examples) - provides a number of examples on how to run real applications with Kubernetes.
3. [Kubernetes Examples](https://github.com/kubernetes/kubernetes/tree/master/examples) - provides a number of examples on how to run real applications with Kubernetes.
38 changes: 38 additions & 0 deletions examples/custom-dockerbridge-cidr/kubernetes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"kubernetesConfig": {
"dockerBridgeSubnet": "192.168.21.5/24"
}
},
"masterProfile": {
"count": 1,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2"
},
"agentPoolProfiles": [
{
"name": "agent",
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet"
}
],
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": ""
}
]
}
},
"servicePrincipalProfile": {
"servicePrincipalClientID": "",
"servicePrincipalClientSecret": ""
}
}
}
2 changes: 1 addition & 1 deletion examples/custom-pod-cidr/kubernetes.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"masterProfile": {
"count": 1,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2"
"vmSize": "Standard_D2_v2"
},
"agentPoolProfiles": [
{
Expand Down
41 changes: 41 additions & 0 deletions examples/dcos-D2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "DCOS"
},
"masterProfile": {
"count": 1,
"dnsPrefix": "",
"vmSize": "Standard_D2"
},
"agentPoolProfiles": [
{
"name": "agentprivate",
"count": 1,
"vmSize": "Standard_D2"
},
{
"name": "agentpublic",
"count": 1,
"vmSize": "Standard_D2",
"dnsPrefix": "",
"ports": [
80,
443,
8080
]
}
],
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": ""
}
]
}
}
}
}
42 changes: 42 additions & 0 deletions examples/disks-storageaccount/dcos-master-sa.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "DCOS"
},
"masterProfile": {
"count": 1,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"storageProfile": "StorageAccount"
},
"agentPoolProfiles": [
{
"name": "agentprivate",
"count": 1,
"vmSize": "Standard_D2_v2"
},
{
"name": "agentpublic",
"count": 1,
"vmSize": "Standard_D2_v2",
"dnsPrefix": "",
"ports": [
80,
443,
8080
]
}
],
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": ""
}
]
}
}
}
}
36 changes: 36 additions & 0 deletions examples/disks-storageaccount/kubernetes-master-sa.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes"
},
"masterProfile": {
"count": 1,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"storageProfile": "StorageAccount"
},
"agentPoolProfiles": [
{
"name": "agentpool1",
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet"
}
],
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": ""
}
]
}
},
"servicePrincipalProfile": {
"servicePrincipalClientID": "",
"servicePrincipalClientSecret": ""
}
}
}
37 changes: 37 additions & 0 deletions examples/disks-storageaccount/swarmmode-master-sa.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "SwarmMode"
},
"masterProfile": {
"count": 3,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"storageProfile": "StorageAccount"
},
"agentPoolProfiles": [
{
"name": "agentpublic",
"count": 3,
"vmSize": "Standard_D2_v2",
"dnsPrefix": "",
"ports": [
80,
443,
8080
]
}
],
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": ""
}
]
}
}
}
}
35 changes: 35 additions & 0 deletions examples/kubernetes-D2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes"
},
"masterProfile": {
"count": 1,
"dnsPrefix": "",
"vmSize": "Standard_D2"
},
"agentPoolProfiles": [
{
"name": "agentpool1",
"count": 3,
"vmSize": "Standard_D2",
"availabilityProfile": "AvailabilitySet"
}
],
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": ""
}
]
}
},
"servicePrincipalProfile": {
"servicePrincipalClientID": "",
"servicePrincipalClientSecret": ""
}
}
}
29 changes: 29 additions & 0 deletions examples/kubernetes-labels/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Kubernetes Agent Node Labels

Labels can be defined for each agent node tye.
The labels can then be used with Kubernetes deployments as [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors)

Labels can be easily defined in the AgentPoolProfile property of the API Model

The definition below adds 2 labels `"bar"` and `"baz"` to all nodes in the `firstpool` pool.

```
"agentPoolProfiles": [
{
"name": "firstpool",
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet",
"customNodeLabels": {
"bar": "lulz",
"baz": "foo"
}
}
],
```

In addition to any custom node labels you may add, ACS Engine will add another label, `"agentpool"`, which identifies which Agent Pool the node belongs to.

You can confirm the labels have been applied on the node by running `kubectl describe node <nodename>`:

![Node Labels](images/kubernetesnodelabels.png)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 549a4c2

Please sign in to comment.