Skip to content

Commit ff04b21

Browse files
authored
Merge pull request #186432 from zhengchang907/removepullsecret
Init PR for removing pull secret related content
2 parents 1cb67dc + 176e09d commit ff04b21

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

articles/aks/howto-deploy-java-liberty-app-with-postgresql.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For more information on Open Liberty, see [the Open Liberty project page](https:
3333
* Install a Java SE implementation (for example, [AdoptOpenJDK OpenJDK 8 LTS/OpenJ9](https://adoptopenjdk.net/?variant=openjdk8&jvmVariant=openj9)).
3434
* Install [Maven](https://maven.apache.org/download.cgi) 3.5.0 or higher.
3535
* Install [Docker](https://docs.docker.com/get-docker/) for your OS.
36-
* Create a user-assigned managed identity and assign `Contributor` role to that identity by following the steps in [Manage user-assigned managed identities](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md). Return to this document after creating the identity and assigning it the necessary role.
36+
* Create a user-assigned managed identity and assign `Owner` role or `Contributor` and `User Access Administrator` roles to that identity by following the steps in [Manage user-assigned managed identities](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md). Assign `Directory readers` role to the identity in Azure AD by following [Assign Azure AD roles to users](../active-directory/roles/manage-roles-portal.md). Return to this document after creating the identity and assigning it the necessary roles.
3737

3838
## Create a Jakarta EE runtime using the portal
3939

@@ -151,15 +151,15 @@ In directory *liberty/config*, the *server.xml* is used to configure the DB conn
151151

152152
### Acquire necessary variables from AKS deployment
153153

154-
After the offer is successfully deployed, an AKS cluster with a namespace will be generated automatically. The AKS cluster is configured to connect to the ACR using a pre-created secret under the generated namespace. Before we get started with the application, we need to extract the namespace and the pull-secret name of the ACR configured for the AKS.
154+
After the offer is successfully deployed, an AKS cluster will be generated automatically. The AKS cluster is configured to connect to the ACR. Before we get started with the application, we need to extract the namespace configured for the AKS.
155155

156156
1. Run following command to print the current deployment file, using the `appDeploymentTemplateYamlEncoded` you saved above. The output contains all the variables we need.
157157

158158
```bash
159159
echo <appDeploymentTemplateYamlEncoded> | base64 -d
160160
```
161161

162-
1. Save the `metadata.namespace` and `spec.pullSecret` from this yaml output aside for later use in this article.
162+
1. Save the `metadata.namespace` from this yaml output aside for later use in this article.
163163

164164
### Build the project
165165

@@ -179,7 +179,6 @@ export DB_TYPE=postgres
179179
export DB_USER=${DB_ADMIN_USERNAME}@${DB_NAME}
180180
export DB_PASSWORD=${DB_ADMIN_PASSWORD}
181181
export NAMESPACE=<metadata.namespace>
182-
export PULL_SECRET=<pullSecret>
183182

184183
mvn clean install
185184
```
@@ -300,4 +299,4 @@ az group delete --name <RESOURCE_GROUP_NAME> --yes --no-wait
300299
* [Azure Database for PostgreSQL](https://azure.microsoft.com/services/postgresql/)
301300
* [Open Liberty](https://openliberty.io/)
302301
* [Open Liberty Operator](https://github.com/OpenLiberty/open-liberty-operator)
303-
* [Open Liberty Server Configuration](https://openliberty.io/docs/ref/config/)
302+
* [Open Liberty Server Configuration](https://openliberty.io/docs/ref/config/)

articles/aks/howto-deploy-java-liberty-app.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ For more details on Open Liberty, see [the Open Liberty project page](https://op
3232
* Install a Java SE implementation (for example, [AdoptOpenJDK OpenJDK 8 LTS/OpenJ9](https://adoptopenjdk.net/?variant=openjdk8&jvmVariant=openj9)).
3333
* Install [Maven](https://maven.apache.org/download.cgi) 3.5.0 or higher.
3434
* Install [Docker](https://docs.docker.com/get-docker/) for your OS.
35+
* Please make sure you have been assigned either `Owner` role or `Contributor` and `User Access Administrator` roles of the subscription. You can verify it by following steps in [List role assignments for a user or group](../role-based-access-control/role-assignments-list-portal.md#list-role-assignments-for-a-user-or-group)
3536

3637
## Create a resource group
3738

@@ -218,7 +219,6 @@ export DB_PORT_NUMBER=1433
218219
export DB_NAME=<Database name>
219220
export DB_USER=<Server admin login>@<Database name>
220221
export DB_PASSWORD=<Server admin password>
221-
export PULL_SECRET=acr-secret
222222
export NAMESPACE=${OPERATOR_NAMESPACE}
223223

224224
mvn clean install
@@ -313,14 +313,12 @@ The steps in this section deploy the application.
313313
314314
Follow steps below to deploy the Liberty application on the AKS cluster.
315315
316-
1. Create a pull secret so that the AKS cluster is authenticated to pull image from the ACR instance.
316+
1. Attach the ACR instance to the AKS cluster so that the AKS cluster is authenticated to pull image from the ACR instance.
317317
318-
```bash
319-
kubectl create secret docker-registry ${PULL_SECRET} \
320-
--docker-server=${LOGIN_SERVER} \
321-
--docker-username=${USER_NAME} \
322-
--docker-password=${PASSWORD}
318+
```azurecli-interactive
319+
az aks update -n $CLUSTER_NAME -g $RESOURCE_GROUP_NAME --attach-acr $REGISTRY_NAME
323320
```
321+
324322
1. Retrieve the value for `artifactId` defined in `pom.xml`.
325323

326324
```bash
@@ -358,13 +356,10 @@ Follow steps below to deploy the Liberty application on the AKS cluster.
358356

359357
Follow steps below to deploy the Liberty application on the AKS cluster.
360358

361-
1. Create a pull secret so that the AKS cluster is authenticated to pull image from the ACR instance.
359+
1. Attach the ACR instance to the AKS cluster so that the AKS cluster is authenticated to pull image from the ACR instance.
362360

363361
```azurecli-interactive
364-
kubectl create secret docker-registry acr-secret \
365-
--docker-server=${LOGIN_SERVER} \
366-
--docker-username=${USER_NAME} \
367-
--docker-password=${PASSWORD}
362+
az aks update -n $CLUSTER_NAME -g $RESOURCE_GROUP_NAME --attach-acr $REGISTRY_NAME
368363
```
369364

370365
1. Verify the current working directory is `javaee-app-simple-cluster/target` of your local clone.

0 commit comments

Comments
 (0)