Skip to content

Commit b3b7ab9

Browse files
committed
fixed command indentation
1 parent 1811890 commit b3b7ab9

File tree

5 files changed

+71
-72
lines changed
  • step-02-create-a-database
  • step-03-bind-java-ee-app-to-database

5 files changed

+71
-72
lines changed

step-02-create-a-database/step-02A-create-a-postgresql-database/README.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,49 @@ Create a PostgreSQL database using commandline tools.
1010

1111
Create a Petstore database using Azure CLI and PostgreSQL CLI:
1212

13-
```bash
14-
az postgres server create --resource-group ${RESOURCE_GROUP} \
15-
--name ${POSTGRES_SERVER_NAME} \
16-
--location ${REGION} \
17-
--admin-user ${POSTGRES_SERVER_ADMIN_LOGIN_NAME} \
18-
--admin-password ${POSTGRES_SERVER_ADMIN_PASSWORD} \
19-
--sku-name GP_Gen5_2
20-
21-
az postgres server firewall-rule create \
22-
--resource-group ${RESOURCE_GROUP} \
23-
--server ${POSTGRES_SERVER_NAME} --name allAzureIPs \
24-
--start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0
25-
26-
az postgres server firewall-rule create \
27-
--resource-group ${RESOURCE_GROUP} \
28-
--server ${POSTGRES_SERVER_NAME} --name myDevBox \
29-
--start-ip-address ${DEVBOX_IP_ADDRESS} --end-ip-address ${DEVBOX_IP_ADDRESS}
30-
31-
psql --host=${POSTGRES_SERVER_FULL_NAME} --port=5432 \
32-
--username=${POSTGRES_SERVER_ADMIN_FULL_NAME} \
33-
--dbname=${POSTGRES_DATABASE_NAME} --set=sslmode=require
34-
```
35-
```text
36-
Password for user postgres@petstore-db:
37-
psql (11.1, server 9.6.10)
38-
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-SHA384, bits: 256, compression: off)
39-
Type "help" for help.
40-
41-
postgres=> \l
42-
List of databases
43-
Name | Owner | Encoding | Collate | Ctype | Access privileges
44-
-------------------+-----------------+----------+----------------------------+----------------------------+-------------------------------------
45-
azure_maintenance | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 | azure_superuser=CTc/azure_superuser
46-
azure_sys | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 |
47-
postgres | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 |
48-
template0 | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 | =c/azure_superuser +
49-
| | | | | azure_superuser=CTc/azure_superuser
50-
template1 | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 | =c/azure_superuser +
51-
| | | | | azure_superuser=CTc/azure_superuser
52-
(5 rows)
53-
54-
postgres=> \q
55-
```
13+
```bash
14+
az postgres server create --resource-group ${RESOURCE_GROUP} \
15+
--name ${POSTGRES_SERVER_NAME} \
16+
--location ${REGION} \
17+
--admin-user ${POSTGRES_SERVER_ADMIN_LOGIN_NAME} \
18+
--admin-password ${POSTGRES_SERVER_ADMIN_PASSWORD} \
19+
--sku-name GP_Gen5_2
20+
21+
az postgres server firewall-rule create \
22+
--resource-group ${RESOURCE_GROUP} \
23+
--server ${POSTGRES_SERVER_NAME} --name allAzureIPs \
24+
--start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0
25+
26+
az postgres server firewall-rule create \
27+
--resource-group ${RESOURCE_GROUP} \
28+
--server ${POSTGRES_SERVER_NAME} --name myDevBox \
29+
--start-ip-address ${DEVBOX_IP_ADDRESS} --end-ip-address ${DEVBOX_IP_ADDRESS}
30+
31+
psql --host=${POSTGRES_SERVER_FULL_NAME} --port=5432 \
32+
--username=${POSTGRES_SERVER_ADMIN_FULL_NAME} \
33+
--dbname=${POSTGRES_DATABASE_NAME} --set=sslmode=require
34+
```
35+
```text
36+
Password for user postgres@petstore-db:
37+
psql (11.1, server 9.6.10)
38+
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-SHA384, bits: 256, compression: off)
39+
Type "help" for help.
40+
41+
postgres=> \l
42+
List of databases
43+
Name | Owner | Encoding | Collate | Ctype | Access privileges
44+
-------------------+-----------------+----------+----------------------------+----------------------------+-------------------------------------
45+
azure_maintenance | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 | azure_superuser=CTc/azure_superuser
46+
azure_sys | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 |
47+
postgres | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 |
48+
template0 | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 | =c/azure_superuser +
49+
| | | | | azure_superuser=CTc/azure_superuser
50+
template1 | azure_superuser | UTF8 | English_United States.1252 | English_United States.1252 | =c/azure_superuser +
51+
| | | | | azure_superuser=CTc/azure_superuser
52+
(5 rows)
53+
54+
postgres=> \q
55+
```
5656

5757
>💡 - you can reinstall `psql` command line tool using `brew reinstall postgresql`.
5858

step-02-create-a-database/step-02B-create-a-mysql-database/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@ Create a Petstore database using Azure CLI and MySQL CLI:
1212

1313
```bash
1414
az mysql server create --resource-group ${RESOURCE_GROUP} \
15-
--name ${MYSQL_SERVER_NAME} --location ${REGION} \
16-
--admin-user ${MYSQL_SERVER_ADMIN_LOGIN_NAME} \
17-
--admin-password ${MYSQL_SERVER_ADMIN_PASSWORD} \
18-
--sku-name GP_Gen5_32 \
19-
--ssl-enforcement Disabled \
20-
--version 5.7
15+
--name ${MYSQL_SERVER_NAME} --location ${REGION} \
16+
--admin-user ${MYSQL_SERVER_ADMIN_LOGIN_NAME} \
17+
--admin-password ${MYSQL_SERVER_ADMIN_PASSWORD} \
18+
--sku-name GP_Gen5_32 \
19+
--ssl-enforcement Disabled \
20+
--version 5.7
2121

2222
// allow access from Azure resources
2323
az mysql server firewall-rule create --name allAzureIPs \
24-
--server ${MYSQL_SERVER_NAME} \
25-
--resource-group ${RESOURCE_GROUP} \
26-
--start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0
24+
--server ${MYSQL_SERVER_NAME} \
25+
--resource-group ${RESOURCE_GROUP} \
26+
--start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0
2727

2828
// allow access from your dev machine for testing
2929
az mysql server firewall-rule create --name myDevBox \
30-
--server ${MYSQL_SERVER_NAME} \
31-
--resource-group ${RESOURCE_GROUP} \
32-
--start-ip-address ${DEVBOX_IP_ADDRESS} --end-ip-address ${DEVBOX_IP_ADDRESS}
30+
--server ${MYSQL_SERVER_NAME} \
31+
--resource-group ${RESOURCE_GROUP} \
32+
--start-ip-address ${DEVBOX_IP_ADDRESS} --end-ip-address ${DEVBOX_IP_ADDRESS}
3333

3434
// increase connection timeout
3535
az mysql server configuration set --name wait_timeout \
36-
--resource-group ${RESOURCE_GROUP} \
37-
--server ${MYSQL_SERVER_NAME} --value 2147483
36+
--resource-group ${RESOURCE_GROUP} \
37+
--server ${MYSQL_SERVER_NAME} --value 2147483
3838

3939
// log into mysql
4040
mysql -u ${MYSQL_SERVER_ADMIN_FULL_NAME} -h ${MYSQL_SERVER_FULL_NAME} -P 3306 -p
@@ -73,8 +73,8 @@ Bye
7373
```
7474
```bash
7575
az mysql server configuration set --name time_zone \
76-
--resource-group ${RESOURCE_GROUP} \
77-
--server ${MYSQL_SERVER_NAME} --value "US/Pacific"
76+
--resource-group ${RESOURCE_GROUP} \
77+
--server ${MYSQL_SERVER_NAME} --value "US/Pacific"
7878
```
7979

8080
When you migrate Java applications to cloud, you will be considering moving data to cloud.

step-02-create-a-database/step-02C-create-a-sql-database/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ Create a Petstore database using Azure CLI:
1212
```bash
1313

1414
az sql server create --admin-user ${SQL_SERVER_ADMIN_LOGIN_NAME} \
15-
--admin-password ${SQL_SERVER_ADMIN_PASSWORD} \
16-
--name ${SQL_SERVER_NAME} \
17-
--resource-group ${RESOURCE_GROUP} --location ${REGION}
15+
--admin-password ${SQL_SERVER_ADMIN_PASSWORD} \
16+
--name ${SQL_SERVER_NAME} \
17+
--resource-group ${RESOURCE_GROUP} --location ${REGION}
1818

1919
az sql server firewall-rule create --server ${SQL_SERVER_NAME} \
20-
--name allAzureIPs \
21-
--start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0 \
22-
--resource-group ${RESOURCE_GROUP}
20+
--name allAzureIPs \
21+
--start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0 \
22+
--resource-group ${RESOURCE_GROUP}
2323

2424
az sql server firewall-rule create --server ${SQL_SERVER_NAME} \
25-
--name myDevBox \
26-
--start-ip-address ${DEVBOX_IP_ADDRESS} --end-ip-address ${DEVBOX_IP_ADDRESS} \
27-
--resource-group ${RESOURCE_GROUP}
25+
--name myDevBox \
26+
--start-ip-address ${DEVBOX_IP_ADDRESS} --end-ip-address ${DEVBOX_IP_ADDRESS} \
27+
--resource-group ${RESOURCE_GROUP}
2828

2929
az sql db create --name ${SQL_DATABASE_NAME} \
3030
--server ${SQL_SERVER_NAME} \

step-03-bind-java-ee-app-to-database/step-03A-bind-app-to-postgresql/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ open https://${WEBAPP}.azurewebsites.net
224224

225225
```bash
226226
psql --host=${POSTGRES_SERVER_FULL_NAME} --port=5432 \
227-
--username=${POSTGRES_SERVER_ADMIN_FULL_NAME} \
228-
--dbname=${POSTGRES_DATABASE_NAME} --set=sslmode=require
227+
--username=${POSTGRES_SERVER_ADMIN_FULL_NAME} \
228+
--dbname=${POSTGRES_DATABASE_NAME} --set=sslmode=require
229229

230230
Password for user postgres@petstore-db:
231231
psql (11.1, server 9.6.10)

step-03-bind-java-ee-app-to-database/step-03B-bind-app-to-mysql/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,7 @@ Bye
277277
Open Java Web app remote log stream from a local machine:
278278
279279
```bash
280-
az webapp log tail --name ${WEBAPP} \
281-
--resource-group ${RESOURCE_GROUP}
280+
az webapp log tail --name ${WEBAPP} --resource-group ${RESOURCE_GROUP}
282281
```
283282
284283
---

0 commit comments

Comments
 (0)