Skip to content

Commit

Permalink
fix: replace some leftover acsengine by aksengine (Azure#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon authored and Justin Hackett committed Mar 14, 2019
1 parent 08902ff commit fa53079
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/custom-vnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ This command will output three files:
wrote _output/Swarm-12652785/apimodel.json
wrote _output/Swarm-12652785/azuredeploy.json
wrote _output/Swarm-12652785/azuredeploy.parameters.json
acsengine took 37.1384ms
aksengine took 37.1384ms
```

- apimodel.json: this is the cluster definition file you gave to AKS Engine
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ az vm show -g <resource group of cluster> -n <name of Master or agent VM> --quer
```json
{
"aksEngineVersion": "v0.15.0",
"creationSource": "acsengine-k8s-master-22116803-0",
"creationSource": "aksengine-k8s-master-22116803-0",
"orchestrator": "Kubernetes:1.9.5",
"poolName": "master",
"resourceNameSuffix": "22116803"
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Setup steps:
5. Type `go get -d github.com/Azure/aks-engine` to download aks-engine from GitHub
6. Type `go get all` to get the supporting components
7. Type `go get -u github.com/go-bindata/go-bindata/...`
8. Type `cd %GOPATH%\src\github.com\Azure\aks-engine\pkg\acsengine`
8. Type `cd %GOPATH%\src\github.com\Azure\aks-engine\pkg\engine`
9. Type `go generate`
10. Type `cd %GOPATH%\src\github.com\Azure\aks-engine\pkg\i18n`
11. Type `go generate`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"orchestratorRelease" : "1.12",
"kubernetesConfig": {
"useManagedIdentity": true,
"userAssignedID": "acsenginetestid"
"userAssignedID": "aksenginetestid"
}
},
"masterProfile": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"orchestratorRelease" : "1.12",
"kubernetesConfig": {
"useManagedIdentity": true,
"userAssignedID": "acsenginetestid"
"userAssignedID": "aksenginetestid"
}
},
"masterProfile": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"orchestratorRelease" : "1.12",
"kubernetesConfig": {
"useManagedIdentity": true,
"userAssignedID": "acsenginetestid"
"userAssignedID": "aksenginetestid"
}
},
"masterProfile": {
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes-msi-userassigned/kube-vma.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"orchestratorType": "Kubernetes",
"kubernetesConfig": {
"useManagedIdentity": true,
"userAssignedID": "acsenginetestid"
"userAssignedID": "aksenginetestid"
}
},
"masterProfile": {
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes-msi-userassigned/kube-vmss.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"orchestratorType": "Kubernetes",
"kubernetesConfig": {
"useManagedIdentity": true,
"userAssignedID": "acsenginetestid"
"userAssignedID": "aksenginetestid"
}
},
"masterProfile": {
Expand Down
4 changes: 2 additions & 2 deletions packer/vhd-image-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"tenant_id": "{{user `tenant_id`}}",
"subscription_id": "{{user `subscription_id`}}",
"resource_group_name": "{{user `resource_group_name`}}",
"capture_container_name": "acsengine-vhds",
"capture_name_prefix": "acsengine-{{timestamp}}",
"capture_container_name": "aksengine-vhds",
"capture_name_prefix": "aksengine-{{timestamp}}",
"storage_account": "{{user `storage_account_name`}}",
"os_type": "Linux",
"os_disk_size_gb": 30,
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/vlabs/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ func TestProperties_ValidateManagedIdentity(t *testing.T) {
name: "use managed identity with master vmss",
orchestratorRelease: "1.11",
useManagedIdentity: true,
userAssignedID: "utacsenginetestid",
userAssignedID: "utaksenginetestid",
masterProfile: MasterProfile{
DNSPrefix: "dummy",
Count: 3,
Expand Down Expand Up @@ -1360,7 +1360,7 @@ func TestProperties_ValidateManagedIdentity(t *testing.T) {
name: "use user assigned identity with master vmas",
orchestratorRelease: "1.11",
useManagedIdentity: true,
userAssignedID: "acsenginetestid",
userAssignedID: "aksenginetestid",
masterProfile: MasterProfile{
DNSPrefix: "dummy",
Count: 3,
Expand Down
18 changes: 9 additions & 9 deletions pkg/armhelpers/azureclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ func NewAzureClientWithDeviceAuth(env azure.Environment, subscriptionID string)
return nil, err
}

// AcsEngineClientID is the AAD ClientID for the CLI native application
acsEngineClientID := getAcsEngineClientID(env.Name)
// aksEngineClientID is the AAD ClientID for the CLI native application
aksEngineClientID := getAksEngineClientID(env.Name)

home, err := homedir.Dir()
if err != nil {
return nil, errors.Wrap(err, "Failed to get user home directory to look for cached token")
}
cachePath := filepath.Join(home, ApplicationDir, "cache", fmt.Sprintf("%s_%s.token.json", tenantID, acsEngineClientID))
cachePath := filepath.Join(home, ApplicationDir, "cache", fmt.Sprintf("%s_%s.token.json", tenantID, aksEngineClientID))

rawToken, err := tryLoadCachedToken(cachePath)
if err != nil {
Expand All @@ -114,15 +114,15 @@ func NewAzureClientWithDeviceAuth(env azure.Environment, subscriptionID string)

var armSpt *adal.ServicePrincipalToken
if rawToken != nil {
armSpt, err = adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, acsEngineClientID, env.ServiceManagementEndpoint, *rawToken, tokenCallback(cachePath))
armSpt, err = adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, aksEngineClientID, env.ServiceManagementEndpoint, *rawToken, tokenCallback(cachePath))
if err != nil {
return nil, err
}
err = armSpt.Refresh()
if err != nil {
log.Warnf("Refresh token failed. Will fallback to device auth. %q", err)
} else {
graphSpt, err := adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, acsEngineClientID, env.GraphEndpoint, armSpt.Token())
graphSpt, err := adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, aksEngineClientID, env.GraphEndpoint, armSpt.Token())
if err != nil {
return nil, err
}
Expand All @@ -136,7 +136,7 @@ func NewAzureClientWithDeviceAuth(env azure.Environment, subscriptionID string)
PollingDuration: DefaultARMOperationTimeout,
}

deviceCode, err := adal.InitiateDeviceAuth(client, *oauthConfig, acsEngineClientID, env.ServiceManagementEndpoint)
deviceCode, err := adal.InitiateDeviceAuth(client, *oauthConfig, aksEngineClientID, env.ServiceManagementEndpoint)
if err != nil {
return nil, err
}
Expand All @@ -146,15 +146,15 @@ func NewAzureClientWithDeviceAuth(env azure.Environment, subscriptionID string)
return nil, err
}

armSpt, err = adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, acsEngineClientID, env.ServiceManagementEndpoint, *deviceToken, tokenCallback(cachePath))
armSpt, err = adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, aksEngineClientID, env.ServiceManagementEndpoint, *deviceToken, tokenCallback(cachePath))
if err != nil {
return nil, err
}
armSpt.Refresh()

adRawToken := armSpt.Token()
adRawToken.Resource = env.GraphEndpoint
graphSpt, err := adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, acsEngineClientID, env.GraphEndpoint, adRawToken)
graphSpt, err := adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, aksEngineClientID, env.GraphEndpoint, adRawToken)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -315,7 +315,7 @@ func getOAuthConfig(env azure.Environment, subscriptionID string) (*adal.OAuthCo
return oauthConfig, tenantID, nil
}

func getAcsEngineClientID(envName string) string {
func getAksEngineClientID(envName string) string {
switch envName {
case "AzureUSGovernmentCloud":
return "e8b7f94b-85c9-47f4-964a-98dafd7fc2d8"
Expand Down
4 changes: 2 additions & 2 deletions pkg/armhelpers/mockclients.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func (mc *MockAKSEngineClient) ListVirtualMachines(ctx context.Context, resource
resourceNameSuffixString := "resourceNameSuffix"
poolnameString := "poolName"

creationSource := "acsengine-k8s-agentpool1-12345678-0"
creationSource := "aksengine-k8s-agentpool1-12345678-0"
orchestrator := "Kubernetes:1.7.9"
resourceNameSuffix := "12345678"
poolname := "agentpool1"
Expand Down Expand Up @@ -446,7 +446,7 @@ func (mc *MockAKSEngineClient) GetVirtualMachine(ctx context.Context, resourceGr
resourceNameSuffixString := "resourceNameSuffix"
poolnameString := "poolName"

creationSource := "acsengine-k8s-agentpool1-12345678-0"
creationSource := "aksengine-k8s-agentpool1-12345678-0"
orchestrator := "Kubernetes:1.7.9"
resourceNameSuffix := "12345678"
poolname := "agentpool1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const (
// DefaultELBSVCAddonName is the name of the elb service addon deployment
DefaultELBSVCAddonName = "elb-svc"
// DefaultGeneratorCode specifies the source generator of the cluster template.
DefaultGeneratorCode = "acsengine"
DefaultGeneratorCode = "aksengine"
// DefaultReschedulerAddonName is the name of the rescheduler addon deployment
DefaultReschedulerAddonName = "rescheduler"
// DefaultHeapsterAddonName is the name of the heapster addon deployment
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func getParameters(cs *api.ContainerService, generatorCode string, aksEngineVers
parametersMap := paramsMap{}
cloudSpecConfig := cs.GetCloudSpecConfig()

// acsengine Parameters
// aksengine Parameters
addValue(parametersMap, "aksEngineVersion", aksEngineVersion)

// Master Parameters
Expand Down
4 changes: 2 additions & 2 deletions pkg/engine/template_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func InitializeTemplateGenerator(ctx Context) (*TemplateGenerator, error) {
}

// GenerateTemplate generates the template from the API Model
func (t *TemplateGenerator) GenerateTemplate(containerService *api.ContainerService, generatorCode string, aksEngineVersion string) (templateRaw string, parametersRaw string, err error) {
func (t *TemplateGenerator) GenerateTemplate(containerService *api.ContainerService, generatorCode string, aksengineVersion string) (templateRaw string, parametersRaw string, err error) {
// named return values are used in order to set err in case of a panic
templateRaw = ""
parametersRaw = ""
Expand Down Expand Up @@ -100,7 +100,7 @@ func (t *TemplateGenerator) GenerateTemplate(containerService *api.ContainerServ
templateRaw = b.String()

var parametersMap paramsMap
if parametersMap, err = getParameters(containerService, generatorCode, aksEngineVersion); err != nil {
if parametersMap, err = getParameters(containerService, generatorCode, aksengineVersion); err != nil {
return templateRaw, parametersRaw, err
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@
"type": "string"
},
"generatorCode": {
"defaultValue": "acsengine",
"defaultValue": "aksengine",
"metadata": {
"description": "The generator code used to identify the generator"
},
Expand Down Expand Up @@ -1998,7 +1998,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"creationSource": "[concat('aksengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"resourceNameSuffix": "[parameters('nameSuffix')]"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@
"type": "string"
},
"generatorCode": {
"defaultValue": "acsengine",
"defaultValue": "aksengine",
"metadata": {
"description": "The generator code used to identify the generator"
},
Expand Down Expand Up @@ -1817,7 +1817,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('agentpool2VMNamePrefix'), copyIndex(variables('agentpool2Offset')))]",
"creationSource": "[concat('aksengine-', variables('agentpool2VMNamePrefix'), copyIndex(variables('agentpool2Offset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"poolName": "agentpool2",
"resourceNameSuffix": "[parameters('nameSuffix')]"
Expand Down Expand Up @@ -2191,7 +2191,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"creationSource": "[concat('aksengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"resourceNameSuffix": "[parameters('nameSuffix')]"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@
"type": "string"
},
"generatorCode": {
"defaultValue": "acsengine",
"defaultValue": "aksengine",
"metadata": {
"description": "The generator code used to identify the generator"
},
Expand Down Expand Up @@ -1763,7 +1763,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('agentppol1VMNamePrefix'), copyIndex(variables('agentppol1Offset')))]",
"creationSource": "[concat('aksengine-', variables('agentppol1VMNamePrefix'), copyIndex(variables('agentppol1Offset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"poolName": "agentppol1",
"resourceNameSuffix": "[parameters('nameSuffix')]"
Expand Down Expand Up @@ -1902,7 +1902,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('agentpool2VMNamePrefix'), copyIndex(variables('agentpool2Offset')))]",
"creationSource": "[concat('aksengine-', variables('agentpool2VMNamePrefix'), copyIndex(variables('agentpool2Offset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"poolName": "agentpool2",
"resourceNameSuffix": "[parameters('nameSuffix')]"
Expand Down Expand Up @@ -2180,7 +2180,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"creationSource": "[concat('aksengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"resourceNameSuffix": "[parameters('nameSuffix')]"
},
Expand Down
8 changes: 4 additions & 4 deletions pkg/engine/transform/transformtestfiles/k8s_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@
"type": "string"
},
"generatorCode": {
"defaultValue": "acsengine",
"defaultValue": "aksengine",
"metadata": {
"description": "The generator code used to identify the generator"
},
Expand Down Expand Up @@ -1766,7 +1766,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('agentppol1VMNamePrefix'), copyIndex(variables('agentppol1Offset')))]",
"creationSource": "[concat('aksengine-', variables('agentppol1VMNamePrefix'), copyIndex(variables('agentppol1Offset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"poolName": "agentppol1",
"resourceNameSuffix": "[parameters('nameSuffix')]"
Expand Down Expand Up @@ -1908,7 +1908,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('agentpool2VMNamePrefix'), copyIndex(variables('agentpool2Offset')))]",
"creationSource": "[concat('aksengine-', variables('agentpool2VMNamePrefix'), copyIndex(variables('agentpool2Offset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"poolName": "agentpool2",
"resourceNameSuffix": "[parameters('nameSuffix')]"
Expand Down Expand Up @@ -2282,7 +2282,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"creationSource": "[concat('aksengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"resourceNameSuffix": "[parameters('nameSuffix')]"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@
"type": "string"
},
"generatorCode": {
"defaultValue": "acsengine",
"defaultValue": "aksengine",
"metadata": {
"description": "The generator code used to identify the generator"
},
Expand Down Expand Up @@ -1759,7 +1759,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('agentpriVMNamePrefix'), copyIndex(variables('agentpriOffset')))]",
"creationSource": "[concat('aksengine-', variables('agentpriVMNamePrefix'), copyIndex(variables('agentpriOffset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"poolName": "agentpri",
"resourceNameSuffix": "[parameters('nameSuffix')]"
Expand Down Expand Up @@ -1901,7 +1901,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('agentpri2VMNamePrefix'), copyIndex(variables('agentpri2Offset')))]",
"creationSource": "[concat('aksengine-', variables('agentpri2VMNamePrefix'), copyIndex(variables('agentpri2Offset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"poolName": "agentpri2",
"resourceNameSuffix": "[parameters('nameSuffix')]"
Expand Down Expand Up @@ -2124,7 +2124,7 @@
}
},
"tags": {
"creationSource": "[concat('acsengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"creationSource": "[concat('aksengine-', variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')))]",
"orchestrator": "[variables('orchestratorNameVersionTag')]",
"resourceNameSuffix": "[parameters('nameSuffix')]"
},
Expand Down
Loading

0 comments on commit fa53079

Please sign in to comment.