You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deploy_daos_cluster_example.md
+22-39Lines changed: 22 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,19 @@ These instructions describe how to deploy a DAOS Cluster using the example in [t
7
7
Deployment tasks described in these instructions:
8
8
9
9
- Deploy a DAOS cluster using Terraform
10
+
- Log into the first DAOS client instance
10
11
- Perform DAOS administrative tasks to prepare the storage
11
-
- Mount a DAOS container with [DFuse (DAOS FUSE)](https://docs.daos.io/v2.0/user/filesystem/?h=dfuse#dfuse-daos-fuse)
12
+
- Mount a DAOS container with [DFuse (DAOS FUSE)](https://docs.daos.io/v2.4/user/filesystem/?h=dfuse#dfuse-daos-fuse)
12
13
- Store files in a DAOS container
13
14
- Unmount the container
14
-
- Remove the deployment (terraform destroy)
15
+
- Undeploy DAOS cluster (terraform destroy)
16
+
17
+
## Prerequisites
18
+
19
+
The steps in the [Pre-Deployment Guide](pre-deployment_guide.md) must be completed prior to deploying the DAOS cluster in this example.
20
+
21
+
The [Pre-Deployment Guide](pre-deployment_guide.md) describes how to build the DAOS images that are used to deploy server and client instances.
22
+
15
23
16
24
## Clone the repository
17
25
@@ -25,7 +33,7 @@ cd ~/google-cloud-daos/terraform/examples/daos_cluster
25
33
26
34
## Create a `terraform.tfvars` file
27
35
28
-
Before you run `terraform` you need to create a `terraform.tfvars` file in the `terraform/examples/daos_cluster` directory.
36
+
Before you run `terraform apply` to deploy the DAOS cluster you need to create a `terraform.tfvars` file in the `terraform/examples/daos_cluster` directory.
29
37
30
38
The `terraform.tfvars` file contains the variable values for the configuration.
31
39
@@ -111,23 +119,19 @@ gcloud compute instances list \
111
119
--format="value(name,INTERNAL_IP)"
112
120
```
113
121
114
-
## Perform DAOS administration tasks
115
-
116
-
After your DAOS cluster has been deployed you can log into the first DAOS server instance to perform administrative tasks.
117
-
118
-
### Log into the first DAOS server instance
122
+
## Log into the first DAOS client instance
119
123
120
124
Log into the first server instance
121
125
122
126
```bash
123
-
gcloud compute ssh daos-server-0001
127
+
gcloud compute ssh daos-client-0001
124
128
```
125
129
126
-
### Verify that all daos-server instances have joined
130
+
##Perform DAOS administration tasks
127
131
128
-
The DAOS Management Tool `dmg` is meant to be used by administrators to manage the DAOS storage system and pools.
132
+
The `dmg`command is used to perform adminstrative tasks such as formatting storage and managing pools and therefore must be run with `sudo`.
129
133
130
-
You will need to run `dmg` with `sudo`.
134
+
### Verify that all daos-server instances have joined
131
135
132
136
Use `dmg` to verify that the DAOS storage system is ready.
133
137
@@ -172,9 +176,7 @@ This shows how much NVMe-Free space is available for each server.
172
176
Create a pool named `pool1` that uses the total NVMe-Free for all servers.
173
177
174
178
```bash
175
-
TOTAL_NVME_FREE="$(sudo dmg storage query usage | awk '{split($0,a," "); sum += a[10]} END {print sum}')TB"
176
-
echo"Total NVMe-Free: ${TOTAL_NVME_FREE}"
177
-
sudo dmg pool create --size="${TOTAL_NVME_FREE}" --tier-ratio=3 --label=pool1
179
+
sudo dmg pool create --size="100%" pool1
178
180
```
179
181
180
182
View the ACLs on *pool1*
@@ -193,44 +195,23 @@ A:G:GROUP@:rw
193
195
194
196
Here we see that root owns the pool.
195
197
196
-
Add an [ACE](https://docs.daos.io/v2.0/admin/pool_operations/#adding-and-updating-aces) that will allow any user to create a container in the pool
198
+
Add an [ACE](https://docs.daos.io/v2.4/admin/pool_operations/#adding-and-updating-aces) that will allow any user to create a container in the pool
197
199
198
200
```bash
199
201
sudo dmg pool update-acl -e A::EVERYONE@:rcta pool1
200
202
```
201
203
202
-
This completes the administration tasks for the pool.
203
-
204
204
For more information about pools see
205
205
206
206
-[Overview - Storage Model - DAOS Pool](https://docs.daos.io/latest/overview/storage/#daos-pool)
207
207
-[Administration Guide - Pool Operations](https://docs.daos.io/latest/admin/pool_operations/)
208
208
209
-
### Log out of the first server instance
210
-
211
-
Now that the administrative tasks have been completed, you may log out of the first server instance.
212
-
213
-
```bash
214
-
logout
215
-
```
216
-
217
209
## Create a Container
218
210
219
-
User tasks such as creating and mounting a container will be done on the first client
220
-
221
-
### Log into the first DAOS client instance
222
-
223
-
Log into the first client instance
224
-
225
-
```bash
226
-
gcloud compute ssh daos-client-0001
227
-
```
228
-
229
-
230
211
Create a [container](https://docs.daos.io/latest/overview/storage/#daos-container) in the pool
Copy file name to clipboardExpand all lines: docs/pre-deployment_guide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,6 @@ Since *project name* and *project ID* are used in many configurations it is reco
20
20
21
21
To create a project, refer to the following documentation
22
22
23
-
-[Get Started with Google Cloud](https://cloud.google.com/docs/get-started)
24
23
-[Creating and managing projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects)
25
24
26
25
Make note of the *Project Name* and *Project ID* for the project that you plan to use for your DAOS deployment as you will be using it later in various configurations.
@@ -152,6 +151,7 @@ If you are currently in Cloud Shell, you don't need to run this command.
152
151
153
152
```bash
154
153
gcloud auth login
154
+
gcloud auth application-default login
155
155
```
156
156
157
157
To learn more about using the Google Cloud CLI see the various [How-to Guides](https://cloud.google.com/sdk/docs/how-to).
Copy file name to clipboardExpand all lines: images/README.md
+59-34Lines changed: 59 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,27 @@
1
1
# Images
2
2
3
-
This directory contains files necessary for building DAOS images using [Cloud Build](https://cloud.google.com/build) and [Packer](https://developer.hashicorp.com/packer/downloads).
3
+
This directory contains files necessary for building DAOS images using
The pre-deployment steps will have you run the `images/build.sh` script once in order to build a DAOS server image and a DAOS client image with the configured default settings.
12
+
The pre-deployment steps will have you run the `images/build.sh` script once in
13
+
order to build a DAOS server image and a DAOS client image with the configured
14
+
default settings.
10
15
11
-
That should be all you need to run the Terraform examples in the `terraform/examples` directory or to run the [DAOS examples in the Google HPC Toolkit](https://github.com/GoogleCloudPlatform/hpc-toolkit/tree/main/community/examples/intel).
16
+
That should be all you need to run the Terraform examples in
17
+
the `terraform/examples` directory or to run the [DAOS examples in the Google HPC Toolkit](https://github.com/GoogleCloudPlatform/hpc-toolkit/tree/main/community/examples/intel).
12
18
13
-
The information in this document is provided in case you need to build custom images with non-default settings.
19
+
The information in this document is provided in case you need to build custom
20
+
images with non-default settings.
14
21
15
22
## Building DAOS images
16
23
17
-
To rebuild the images with the default settings run:
24
+
To build the images with the default settings run:
18
25
19
26
```bash
20
27
cd images
@@ -23,13 +30,32 @@ cd images
23
30
24
31
## The Packer HCL template file
25
32
26
-
A single Packer HCL template file `daos.pkr.hcl` is used to build either a DAOS server or DAOS client image.
33
+
A single Packer HCL template file `daos.pkr.hcl` is used to build either a DAOS
34
+
server or DAOS client image.
27
35
28
-
The `daos.pkr.hcl` file does not build both server and client images in a single `packer build` run. This is by design since there are use cases in which only one type of image is needed. If both types of images are needed, then `packer build` must be run twice with different variable values.
36
+
The `daos.pkr.hcl` file does not build both server and client images in a single `packer build` run.
37
+
This is by design since there are use cases in which only one type of image is needed. If both types
38
+
of images are needed, then `packer build` must be run twice with different variable values.
39
+
40
+
The `build.sh` script does this for you by running packer twice with different variable values for
41
+
server and client images.
29
42
30
43
### Source Block
31
44
32
-
Within the `daos.pkr.hcl` template there is a single `source` block. Most of the settings for the block are set by variable values.
45
+
Within the `daos.pkr.hcl` template there is a single `source` block. The settings
46
+
settings for the block are provided by variable values. This allows the settings
47
+
to be passed to packer via a variables file which is specified by the `-var-file` parameter
48
+
of the `packer build` command.
49
+
50
+
The `build.sh` script generates a packer variables file from the `GCP_*` and `DAOS_*` environment
51
+
variables defined in the script.
52
+
53
+
Run `./build.sh --help` to see a list of environment variables that are used
54
+
by the `./build.sh` script to create a packer variables file that will be
55
+
passed to packer to create the images.
56
+
57
+
You can export these variables before running the `build.sh` script to customize
58
+
the images or to modify Cloud Build settings.
33
59
34
60
### Build Block
35
61
@@ -41,7 +67,8 @@ The `build` block consists of provisioners that do the following:
41
67
42
68
These provisioners are the same for building both DAOS server and DAOS client images.
43
69
44
-
The `daos_install_type` variable in the `daos.pkr.hcl` template is passed in the `--extra-vars` parameter when running the `daos.yml` ansible playbook.
70
+
The `daos_install_type` variable in the `daos.pkr.hcl` template is passed in the `--extra-vars`
71
+
parameter of the `ansible-playbook` command when running the `daos.yml` ansible playbook.
45
72
46
73
If `daos_install_type=server`, then the `daos.yml` playbook will install the DAOS server packages.
47
74
@@ -74,13 +101,15 @@ The `images/build.sh` script uses the following environment variables.
74
101
75
102
To view the default values for these variables see the defaults set in the `build.sh` script.
76
103
77
-
Running `build.sh --help` will display the values of these variables so that you can inspect them before running `build.sh`
104
+
Running `build.sh --help` will display the values of these variables so that you can inspect them
105
+
before running `build.sh`
78
106
79
107
### Controlling the version of DAOS to be installed
80
108
81
109
Official DAOS packages are hosted at https://packages.daos.io/
82
110
83
-
Unfortunately, the paths to the `.repo` files for each repository do not follow a standard convention that can be dynamically created based on something like the `/etc/os-release` file.
111
+
Unfortunately, the paths to the `.repo` files for each repository do not follow a standard
112
+
convention that can be dynamically created based on something like the `/etc/os-release` file.
84
113
85
114
To specify the path to a repo file the following 3 environment variables are used:
86
115
@@ -98,28 +127,16 @@ The values of these variables should not start or end with a `/`
For the source image, use the `rocky-linux-8-optimized-gcp` community image instead of the `hpc-rocky-linux-8` image.
172
+
For the source image, use the `rocky-linux-8-optimized-gcp` community image instead of the
173
+
`hpc-rocky-linux-8` image.
155
174
156
175
```bash
157
176
cd images
@@ -204,6 +223,12 @@ export GCP_USE_CLOUDBUILD="false" # Do not run packer in Cloud Build
204
223
./build.sh
205
224
```
206
225
207
-
When running `build.sh` this way, all project configuration steps are skipped.
226
+
When running `build.sh` this way, all GCP project configuration steps (setting permissions) are skipped.
227
+
228
+
When `GCP_USE_CLOUDBUILD="true"` the `build.sh` will check your GCP project to ensure the default
229
+
service account has the proper permissions needed for the Cloud Build job to run packer and create
230
+
the images in your project.
208
231
209
-
When `GCP_USE_CLOUDBUILD="true"` the `build.sh` will check your GCP project to ensure the default service account has the proper permissions needed for the Cloud Build job to run packer and create the images in your project. Setting `GCP_USE_CLOUDBUILD="true"` will skip the project configuration steps. In this case, it's up to you to make sure the proper permissions are configured for you to run packer locally to build the images.
232
+
Setting `GCP_USE_CLOUDBUILD="false"` will skip the project configuration steps. In this case, it's
233
+
up to you to make sure the proper permissions are configured for you to run packer locally to build
0 commit comments