forked from Azure/acs-engine
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6,069 changed files
with
1,934,109 additions
and
21,158 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
./acs-engine | ||
./acs-engine.exe | ||
./_output | ||
./.git | ||
./test/acs-engine-test/acs-engine-test | ||
./test/acs-engine-test/acs-engine-test | ||
## autogenerated | ||
./pkg/i18n/translations.go | ||
./pkg/acsengine/templates.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,145 @@ | ||
TARGETS = darwin/amd64 linux/amd64 windows/amd64 | ||
DIST_DIRS = find * -type d -exec | ||
|
||
.NOTPARALLEL: | ||
|
||
.PHONY: prereqs build test test_fmt validate-generated fmt lint ci devenv | ||
.PHONY: bootstrap build test test_fmt validate-generated fmt lint ci devenv | ||
|
||
ifdef DEBUG | ||
GOFLAGS := -gcflags="-N -l" | ||
else | ||
GOFLAGS := | ||
endif | ||
|
||
VERSION=`git describe --always --long --dirty` | ||
BUILD=`date +%FT%T%z` | ||
# go option | ||
GO ?= go | ||
TAGS := | ||
LDFLAGS := | ||
BINDIR := $(CURDIR)/bin | ||
BINARIES := acs-engine | ||
VERSION ?= $(shell git rev-parse HEAD) | ||
VERSION_SHORT ?= $(shell git rev-parse --short HEAD) | ||
GITTAG := $(shell git describe --exact-match --tags $(shell git log -n1 --pretty='%h') 2> /dev/null) | ||
ifeq ($(GITTAG),) | ||
GITTAG := $(VERSION_SHORT) | ||
endif | ||
|
||
# this isn't particularly pleasant, but it works with the least amount | ||
# of requirements around $GOPATH. The extra sed is needed because `gofmt` | ||
# operates on paths, go list returns package names, and `go fmt` always rewrites | ||
# which is not what we need to do in the `test_fmt` target. | ||
GOFILES=`go list ./... | grep -v "github.com/Azure/acs-engine/vendor" | sed 's|github.com/Azure/acs-engine|.|g' | grep -v -w '^.$$'` | ||
REPO_PATH := github.com/Azure/acs-engine | ||
DEV_ENV_IMAGE := quay.io/deis/go-dev:v1.2.0 | ||
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH} | ||
DEV_ENV_OPTS := --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_VARS} | ||
DEV_ENV_CMD := docker run ${DEV_ENV_OPTS} ${DEV_ENV_IMAGE} | ||
DEV_ENV_CMD_IT := docker run -it ${DEV_ENV_OPTS} ${DEV_ENV_IMAGE} | ||
DEV_CMD_RUN := docker run ${DEV_ENV_OPTS} | ||
ifdef DEBUG | ||
LDFLAGS := -X main.version=${VERSION} | ||
else | ||
LDFLAGS := -s -X main.version=${VERSION} | ||
endif | ||
BINARY_DEST_DIR ?= bin | ||
|
||
all: build | ||
|
||
prereqs: | ||
go get github.com/Masterminds/glide | ||
go get github.com/jteeuwen/go-bindata/... | ||
glide install | ||
.PHONY: generate | ||
generate: bootstrap | ||
go generate $(GOFLAGS) -v `glide novendor | xargs go list` | ||
|
||
.PHONY: build | ||
build: generate | ||
GOBIN=$(BINDIR) $(GO) install $(GOFLAGS) -ldflags '$(LDFLAGS)' | ||
cd test/acs-engine-test; go build $(GOFLAGS) | ||
|
||
build-binary: generate | ||
go build $(GOFLAGS) -v -ldflags "${LDFLAGS}" -o ${BINARY_DEST_DIR}/acs-engine . | ||
|
||
# usage: make clean build-cross dist VERSION=v0.4.0 | ||
.PHONY: build-cross | ||
build-cross: build | ||
build-cross: LDFLAGS += -extldflags "-static" | ||
build-cross: | ||
CGO_ENABLED=0 gox -output="_dist/acs-engine-${GITTAG}-{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' | ||
|
||
.PHONY: build-windows-k8s | ||
build-windows-k8s: | ||
./scripts/build-windows-k8s.sh -v ${K8S_VERSION} -p ${PATCH_VERSION} | ||
|
||
.PHONY: dist | ||
dist: build-cross | ||
( \ | ||
cd _dist && \ | ||
$(DIST_DIRS) cp ../LICENSE {} \; && \ | ||
$(DIST_DIRS) cp ../README.md {} \; && \ | ||
$(DIST_DIRS) tar -zcf {}.tar.gz {} \; && \ | ||
$(DIST_DIRS) zip -r {}.zip {} \; \ | ||
) | ||
|
||
build: | ||
go generate -v $(GOFILES) | ||
go build -v -ldflags="-X github.com/Azure/acs-engine/cmd.BuildSHA=${VERSION} -X github.com/Azure/acs-engine/cmd.BuildTime=${BUILD}" | ||
cd test/acs-engine-test; go build -v | ||
.PHONY: checksum | ||
checksum: | ||
for f in _dist/*.{gz,zip} ; do \ | ||
shasum -a 256 "$${f}" | awk '{print $$1}' > "$${f}.sha256" ; \ | ||
done | ||
|
||
test: test_fmt | ||
go test -v $(GOFILES) | ||
.PHONY: clean | ||
clean: | ||
@rm -rf $(BINDIR) ./_dist | ||
|
||
GIT_BASEDIR = $(shell git rev-parse --show-toplevel 2>/dev/null) | ||
ifneq ($(GIT_BASEDIR),) | ||
LDFLAGS += -X github.com/Azure/acs-engine/pkg/test.JUnitOutDir=${GIT_BASEDIR}/test/junit | ||
endif | ||
|
||
test: generate | ||
ginkgo -skipPackage test/e2e -r . | ||
|
||
.PHONY: test-style | ||
test-style: | ||
@scripts/validate-go.sh | ||
|
||
validate-generated: | ||
./scripts/validate-generated.sh | ||
.PHONY: test-e2e | ||
test-e2e: | ||
@test/e2e.sh | ||
|
||
HAS_GLIDE := $(shell command -v glide;) | ||
HAS_GOX := $(shell command -v gox;) | ||
HAS_GIT := $(shell command -v git;) | ||
HAS_GOBINDATA := $(shell command -v go-bindata;) | ||
HAS_GOMETALINTER := $(shell command -v gometalinter;) | ||
HAS_GINKGO := $(shell command -v ginkgo;) | ||
|
||
.PHONY: bootstrap | ||
bootstrap: | ||
ifndef HAS_GLIDE | ||
go get -u github.com/Masterminds/glide | ||
endif | ||
ifndef HAS_GOX | ||
go get -u github.com/mitchellh/gox | ||
endif | ||
ifndef HAS_GOBINDATA | ||
go get github.com/jteeuwen/go-bindata/... | ||
endif | ||
ifndef HAS_GIT | ||
$(error You must install Git) | ||
endif | ||
ifndef HAS_GOMETALINTER | ||
go get -u github.com/alecthomas/gometalinter | ||
gometalinter --install | ||
endif | ||
ifndef HAS_GINKGO | ||
go get -u github.com/onsi/ginkgo/ginkgo | ||
endif | ||
|
||
build-vendor: | ||
${DEV_ENV_CMD} rm -f glide.lock && rm -Rf vendor/ && glide --debug install --force | ||
|
||
ci: prereqs validate-generated build test lint | ||
ci: bootstrap test-style build test lint | ||
./scripts/coverage.sh --coveralls | ||
|
||
.PHONY: coverage | ||
coverage: | ||
@scripts/ginkgo.coverage.sh | ||
|
||
devenv: | ||
./scripts/devenv.sh | ||
|
||
include versioning.mk | ||
include test.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# Microsoft Azure Container Service Engine - Builds Docker Enabled Clusters | ||
[![Coverage Status](https://coveralls.io/repos/github/Azure/acs-engine/badge.svg?branch=master)](https://coveralls.io/github/Azure/acs-engine?branch=master) | ||
[![CircleCI](https://circleci.com/gh/Azure/acs-engine/tree/master.svg?style=svg)](https://circleci.com/gh/Azure/acs-engine/tree/master) | ||
|
||
## Overview | ||
|
||
|
@@ -8,9 +10,9 @@ The cluster definition file enables the following customizations to your Docker | |
* choice of DC/OS, Kubernetes, Swarm Mode, or Swarm orchestrators | ||
* multiple agent pools where each agent pool can specify: | ||
* standard or premium VM Sizes, | ||
* node count, | ||
* node count, | ||
* Virtual Machine ScaleSets or Availability Sets, | ||
* Storage Account Disks or Managed Disks (under private preview), | ||
* Storage Account Disks or Managed Disks (under private preview) | ||
* Docker cluster sizes of 1200 | ||
* Custom VNET | ||
|
||
|
@@ -22,9 +24,9 @@ The cluster definition file enables the following customizations to your Docker | |
* [Kubernetes Walkthrough](docs/kubernetes.md) - shows how to create a Kubernetes enabled Docker cluster on Azure | ||
* [Swarm Walkthrough](docs/swarm.md) - shows how to create a Swarm enabled Docker cluster on Azure | ||
* [Swarm Mode Walkthrough](docs/swarmmode.md) - shows how to create a Swarm Mode cluster on Azure | ||
* [Custom VNET](examples/vnet) - shows how to use a custom VNET | ||
* [Custom VNET](examples/vnet) - shows how to use a custom VNET | ||
* [Attached Disks](examples/disks-storageaccount) - shows how to attach up to 4 disks per node | ||
* [Managed Disks](examples/disks-managed) (under private preview) - shows how to use managed disks | ||
* [Managed Disks](examples/disks-managed) (under private preview) - shows how to use managed disks | ||
* [Large Clusters](examples/largeclusters) - shows how to create cluster sizes of up to 1200 nodes | ||
|
||
## Contributing | ||
|
@@ -38,7 +40,9 @@ Please follow these instructions before submitting a PR: | |
should deploy the relevant example cluster definitions to ensure you're not | ||
introducing any sort of regression. | ||
|
||
## Usage (Template Generation) | ||
## Usage | ||
|
||
### Generate Templates | ||
|
||
Usage is best demonstrated with an example: | ||
|
||
|
@@ -55,74 +59,6 @@ This produces a new directory inside `_output/` that contains an ARM template | |
for deploying Kubernetes into Azure. (In the case of Kubernetes, some additional | ||
needed assets are generated and placed in the output directory.) | ||
|
||
## Deployment Usage | ||
|
||
Generated templates can be deployed using | ||
[the Azure XPlat CLI (v0.10**.0** only)](https://github.com/Azure/azure-xplat-cli/releases/tag/v0.10.0-May2016), | ||
[the Azure CLI 2.0](https://github.com/Azure/azure-cli) or | ||
[Powershell](https://github.com/Azure/azure-powershell). | ||
|
||
### Deploying with Azure XPlat CLI | ||
|
||
**NOTE:** Some deployments will fail if certain versions of the Azure XPlat CLI are used. It's recommended that you use [Azure XPlat CLI 0.10**.0**](https://github.com/Azure/azure-xplat-cli/releases/tag/v0.10.0-May2016) until a new point release of `0.10.x` is available with the fix. | ||
|
||
```bash | ||
$ azure login | ||
|
||
$ azure account set "<SUBSCRIPTION NAME OR ID>" | ||
|
||
$ azure config mode arm | ||
|
||
$ azure group create \ | ||
--name="<RESOURCE_GROUP_NAME>" \ | ||
--location="<LOCATION>" | ||
|
||
$ azure group deployment create \ | ||
--name="<DEPLOYMENT NAME>" \ | ||
--resource-group="<RESOURCE_GROUP_NAME>" \ | ||
--template-file="./_output/<INSTANCE>/azuredeploy.json" \ | ||
--parameters-file="./_output/<INSTANCE>/azuredeploy.parameters.json" | ||
``` | ||
|
||
### Deploying with Azure CLI 2.0 | ||
**NOTE:** Azure CLI 2.0 is still in preview, so changes may occur. | ||
Please reference [the Azure CLI 2.0 GitHub Repo](https://github.com/Azure/azure-cli) for updated commands and please | ||
ensure that your installation is up to date with the latest release. (Releases occur weekly!) | ||
|
||
```bash | ||
$ az login | ||
|
||
$ az account set --subscription "<SUBSCRIPTION NAME OR ID>" | ||
|
||
$ az group create \ | ||
--name "<RESOURCE_GROUP_NAME>" \ | ||
--location "<LOCATION>" | ||
|
||
$ az group deployment create \ | ||
--name "<DEPLOYMENT NAME>" \ | ||
--resource-group "<RESOURCE_GROUP_NAME>" \ | ||
--template-file "./_output/<INSTANCE>/azuredeploy.json" \ | ||
--parameters "./_output/<INSTANCE>/azuredeploy.parameters.json" | ||
``` | ||
|
||
### Deploying with Powershell | ||
|
||
```powershell | ||
Add-AzureRmAccount | ||
Select-AzureRmSubscription -SubscriptionID <SUBSCRIPTION_ID> | ||
New-AzureRmResourceGroup ` | ||
-Name <RESOURCE_GROUP_NAME> ` | ||
-Location <LOCATION> | ||
New-AzureRmResourceGroupDeployment ` | ||
-Name <DEPLOYMENT_NAME> ` | ||
-ResourceGroupName <RESOURCE_GROUP_NAME> ` | ||
-TemplateFile _output\<INSTANCE>\azuredeploy.json ` | ||
-TemplateParameterFile _output\<INSTANCE>\azuredeploy.parameters.json | ||
``` | ||
|
||
## Code of conduct | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. |
Oops, something went wrong.