@@ -9,24 +9,26 @@ concepts such as projects and cluster template management.
9
9
Please send questions or comments to [ the Azure CycleCloud PM team] ( mailto:askcyclecloud@microsoft.com ) .
10
10
11
11
## Goals
12
- By the end of this lab, we will cover:
13
- * Installing and configuring the Azure CycleCloud ` cyclecloud ` CLI tool
14
- * Creating a new CycleCloud project, a way of configuring and customizing a
12
+
13
+ In this lab you will learn how to:
14
+
15
+ * Install and configure the Azure CycleCloud ` cyclecloud ` CLI tool
16
+ * Create a new CycleCloud project, a way of configuring and customizing a
15
17
CycleCloud cluster
16
- * Modifying a cluster template to add storage to the cluster's NFS server
17
- * Importing the modified cluster template into CycleCloud in order to add a new
18
- cluster type
19
- * Starting the new cluster type, and verifying that the persistent storage has been
20
- added to the file system
18
+ * Modify a cluster template to add storage to the cluster's NFS server
19
+ * Import cluster templates into CycleCloud in order to add new cluster type
20
+ * Create a new cluster from a custom cluster type, start it, and verify that the persistent storage has been added to the file system
21
21
22
22
## Pre-requisites
23
+
23
24
* Standard lab
24
25
[ prerequisites] ( https://github.com/CycleCloud/cyclecloud_tutorials/blob/master/README.md#prerequisites )
25
26
26
27
## 3. Modifying a cluster template
28
+
27
29
Azure CycleCloud's cluster types are great for standard use cases. But
28
30
occassionally users find themselves needing to customize the clusters for more
29
- advanced or differently configured deployments.
31
+ advanced or differently configured deployments.
30
32
31
33
A common customization is adding managed disks to a VM in a
32
34
compute cluster. By default, in most Azure CycleCloud clusters the master nodes
@@ -45,10 +47,11 @@ environment. Once again, we will use the [Azure Cloud Shell](https://shell.azure
45
47
as our shell environment.
46
48
47
49
### 3.1 Installing and setting up the Azure CycleCloud CLI
50
+
48
51
* If you are still logged onto the LAMMPS master node from the [ previous lab] ( /Lab1/Tutorial.md ) ,
49
52
return to Cloud Shell by running the ` exit ` command.
50
53
51
- ```
54
+ ``` sh
52
55
[ellen@ip-0A000404 ~ ]$ exit
53
56
logout
54
57
Connection to 40.114.123.148 closed.
@@ -57,7 +60,8 @@ as our shell environment.
57
60
58
61
* Download the CycleCloud command line installer into the Cloud Shell
59
62
environment by running the following command from the prompt:
60
- ```
63
+
64
+ ``` sh
61
65
ellen@Azure:~ $ wget https://cyclecloudarm.blob.core.windows.net/cyclecloudrelease/7.5.0/cyclecloud-cli.zip
62
66
--2018-08-02 21:48:30-- https://cyclecloudarm.blob.core.windows.net/cyclecloudrelease/7.5.0/cyclecloud-cli.zip
63
67
Resolving cyclecloudarm.blob.core.windows.net (cyclecloudarm.blob.core.windows.net)... 52.239.154.132
@@ -71,8 +75,10 @@ as our shell environment.
71
75
2018-08-02 21:48:31 (112 MB/s) - ‘cyclecloud-cli.zip’ saved [4546572/4546572]
72
76
ellen@Azure:~ $
73
77
```
78
+
74
79
* Unzip the file:
75
- ```
80
+
81
+ ``` sh
76
82
ellen@Azure:~ $ unzip cyclecloud-cli.zip
77
83
Archive: cyclecloud-cli.zip
78
84
creating: cyclecloud-cli-installer/
@@ -93,18 +99,20 @@ as our shell environment.
93
99
inflating: cyclecloud-cli-installer/packages/pogo-sdist.tar.gz
94
100
ellen@Azure:~ $
95
101
```
96
- * Change into the unzipped install directory, and run the install script
97
- ```
102
+
103
+ * Change into the unzipped install directory, and run the install script
104
+
105
+ ``` sh
98
106
ellen@Azure:~ $ cd cyclecloud-cli-installer
99
107
ellen@Azure:~ /cyclecloud-cli-installer$ ./install.sh
100
108
cyclecloud and pogo commands have been installed to /home/ellen/bin
101
109
ellen@Azure:~ /cyclecloud-cli-installer$
102
110
```
103
111
104
- - If you receive the error `'/home/ellen/bin' not found in your PATH
112
+ * If you receive the error `'/home/ellen/bin' not found in your PATH
105
113
environment variable. Make sure to update it`, you can fix it as follows:
106
114
107
- ```
115
+ ``` sh
108
116
ellen@Azure:~ $ echo $PATH
109
117
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/opt/mssql-tools/bin
110
118
ellen@Azure:~ $ export PATH=~ /bin:$PATH
@@ -116,15 +124,15 @@ as our shell environment.
116
124
117
125
The Azure CycleCloud CLI communicates with the server over a REST API. To use
118
126
it you first have to initialize it using the ` initialize` command.
119
- - The CycleServer URL is the FQDN of your application
127
+ * The CycleServer URL is the FQDN of your application
120
128
server set up in [Lab 1 Section 1.7](/Lab1/Tutorial.md#1.7).
121
- - The installed Azure CycleCloud server uses either a Let's Encrypt SSL
129
+ * The installed Azure CycleCloud server uses either a Let' s Encrypt SSL
122
130
certificate or a self-signed certificate. Type `yes` when asked if you allow an
123
131
untrusted certificate.
124
- - The CycleServer username is the one use to log into the CycleCloud web portal.
125
- - The CycleServer password is the password for the user above.
132
+ * The CycleServer username is the one use to log into the CycleCloud web portal.
133
+ * The CycleServer password is the password for the user above.
126
134
127
- ```
135
+ ```sh
128
136
ellen@Azure:~$ cyclecloud initialize
129
137
CycleServer URL: [http://localhost:8080] https://{FQDN}
130
138
Detected untrusted certificate. Allow?: [no] yes
@@ -145,7 +153,8 @@ as our shell environment.
145
153
146
154
* Verify that the CycleCloud CLI works using the `show_cluster` command. The command
147
155
should display the LAMMPS cluster you created in [Lab 1](/Lab1/Tutorial.md#2.1).
148
- ```
156
+
157
+ ```sh
149
158
ellen@Azure:~$ cyclecloud show_cluster
150
159
--------------------
151
160
LammpsLabs : started
@@ -155,9 +164,10 @@ as our shell environment.
155
164
master: Started e6e008a1259743f8406967a023633a6a 40.114.123.148 (10.0.4.4)
156
165
Total nodes: 1
157
166
ellen@Azure:~$
158
- ```
167
+ ```
168
+
169
+ ### <a name="3.2"></a> 3.2 Creating a new CycleCloud Project
159
170
160
- ### 3.2 Creating a new CycleCloud Project
161
171
Azure CycleCloud clusters are defined using text files. To take a look at one of
162
172
these, use the CycleCloud CLI to create a new project, and generate a template
163
173
from it.
@@ -166,13 +176,13 @@ from it.
166
176
167
177
Create a parent directory for cyclecloud
168
178
projects, then create a new project with the `cyclecloud project init`
169
- command.
179
+ command.
170
180
171
- - In the example below, the project is named `azurecyclecloud_labs`.
172
- - When asked for the `Default Locker`, specify `azure-storage`. This was
181
+ * In the example below, the project is named `azurecyclecloud_labs`.
182
+ * When asked for the `Default Locker`, specify `azure-storage`. This was
173
183
created for you during deployment.
174
184
175
- ```
185
+ ```sh
176
186
ellen@Azure:~$ mkdir ~/cyclecloud_projects/
177
187
ellen@Azure:~$ cd ~/cyclecloud_projects/
178
188
ellen@Azure:~/cyclecloud_projects$ cyclecloud project init azurecyclecloud_labs
@@ -192,29 +202,36 @@ from it.
192
202
to modify the file but you can use another editor (such as `vi` or `emacs`).
193
203
194
204
Add the line `type = application` into `project.ini` and save the changes.
195
- ```
205
+
206
+ ```sh
196
207
ellen@Azure:~/cyclecloud_projects$ cd ./azurecyclecloud_labs
197
208
ellen@Azure:~/cyclecloud_projects/azurecyclecloud_labs$ code .
198
209
```
210
+
199
211

200
212
201
213
### 3.3 Generate a new cluster template file
214
+
202
215
* Run the following command to create a new cluster template. The last argument
203
216
is the output file that will contain our new template.
204
217
205
- ```
218
+ ```sh
206
219
ellen@Azure:~/cyclecloud_projects/azurecyclecloud_labs$ cyclecloud project generate_template templates/pbs_extended_nfs.template.txt
207
220
Cluster template written to templates/pbs_extended_nfs.template.txt
208
221
ellen@Azure:~/cyclecloud_projects/azurecyclecloud_labs$
209
222
```
210
223
211
224
### 3.4 Add volumes to the NFS server in the template
225
+
212
226
* Open the generated template file in an editor:
213
- ```
227
+
228
+ ```sh
214
229
ellen@Azure:~/cyclecloud_projects/azurecyclecloud_labs$ code templates/pbs_extended_nfs.template.txt
215
230
```
231
+
216
232
* After line 44, add the following blocks:
217
- ```INI
233
+
234
+ ```ini
218
235
# Add 2 premium disks in a RAID 0 configuration to the NFS export
219
236
[[[volume nfs-1]]]
220
237
Size = 512
@@ -233,6 +250,7 @@ from it.
233
250
fs_type = ext4
234
251
raid_level = 0
235
252
```
253
+
236
254
* Save the changes. The template file should now look like this: 
237
255
238
256
These 15 lines express that two premium disks (`SSD = True`) of 512GB each
@@ -247,8 +265,10 @@ from it.
247
265
[More information about customizing volumes and mounts in a CycleCloud cluster.](https://docs.microsoft.com/en-us/azure/cyclecloud/attach-storage)
248
266
249
267
### 3.5 Import the new cluster template
268
+
250
269
* Using the CycleCloud CLI, import the template into the application server:
251
- ```
270
+
271
+ ```sh
252
272
ellen@Azure:~/cyclecloud_projects/azurecyclecloud_labs$ cyclecloud import_template -f templates/pbs_extended_nfs.template.txt
253
273
Importing default template in templates/pbs_extended_nfs.template.txt....
254
274
---------------------------------
@@ -260,10 +280,12 @@ from it.
260
280
Total nodes: 1
261
281
ellen@Azure:~/cyclecloud_projects/azurecyclecloud_labs$
262
282
```
283
+
263
284
* You should now see a new cluster type in the Azure CycleCloud UI:
264
285

265
286
266
287
### 3.6 Start the cluster
288
+
267
289
* Follow the procedure in [Section 2 from Lab 1](/Lab1/Tutorial.md#2.1) to start
268
290
a new cluster based on this new cluster type. Note that you must select a
269
291
"Master VM Type" that supports attached premium storage, such as
@@ -272,7 +294,7 @@ from it.
272
294
* After the cluster is started, log into the master node and verify that
273
295
`/mnt/exports` is a 1TB volume:
274
296
275
- ```
297
+ ```sh
276
298
[ellen@ip-0A000405 ~]$ df -H /mnt/exports
277
299
Filesystem Size Used Avail Use% Mounted on
278
300
/dev/mapper/vg_cyclecloud_nfs-lv0 1.1T 80M 1.1T 1% /mnt/exports
0 commit comments