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
A command line python utility designed to easily interact with seismic store.
16
+
Sdutil is a command line python utility tool designed to easily interact with seismic store. The seismic store is a cloud-based solution designed to store and manage datasets of any size in the cloud by enabling a secure way to access them through a scoped authorization mechanism. Seismic Store overcomes the object size limitations imposed by a cloud provider by managing generic datasets as multi-independent objects. This provides a generic, reliable, and better performing solution to handle data in cloud storage.
17
17
18
-
Seismic store is a cloud-based solution designed to store and manage datasets of any size in the cloud by enabling a secure way to access them through a scoped authorization mechanism. Seismic Store overcomes the object size limitations imposed by a cloud provider, by managing generic datasets as multi-independent objects and, therefore, provides a generic, reliable and a better performed solution to handle data on a cloud storage.
19
-
20
-
The **sdutil** is an intuitive command line utility tool to interact with seismic store and perform some basic operations like upload or download datasets to or from seismic store, manage users, list folders content and more.
18
+
**Sdutil** is an intuitive command line utility tool to interact with seismic store and perform some basic operations like upload or download datasets to or from seismic store, manage users, list folders content and more.
21
19
22
20
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
Other requirements are addressed in the INSTALLATION section below.
41
+
Other requirements are addressed in the [installation](#installation) section below.
44
42
45
43
## Installation
46
44
47
45
Follow the directions in the sdutil documentation for [running sdutil in Azure environments](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil/-/tree/azure/stable#setup-and-usage-for-azure-env).
48
46
49
-
The utility requires other modules noted in [requirements.txt](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil/-/blob/azure/stable/requirements.txt). You could either install the modules as is or install them in virtualenv to keep your host clean from package conflicts. if you don't want to install them in a virtual environment jump directly to the step 3.
47
+
The utility requires other modules noted in [requirements.txt](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil/-/blob/azure/stable/requirements.txt). You could either install the modules as is or install them in virtualenv to keep your host clean from package conflicts. If you don't want to install them in a virtual environment, jump directly to step 3.
1. Replace/edit `config.yaml` in `sdlib/config.yaml` by this [config-azure.yaml](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil/-/blob/azure/stable/docs/config-azure.yaml)
75
+
1. Clone the [sdutil repository](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil/-/tree/azure/stable) and open in your favorite editor.
76
+
77
+
2. Replace the contents of `config.yaml` in the `sdlib` folder with the following yaml and fill in the three templatized values (two instances of `<meds-instance-url>` and one `<put refresh token here...>`):
Run the utility from the extracted utility folder by typing:
114
+
1.Run the utility from the extracted utility folder by typing:
100
115
101
-
```bash
102
-
python sdutil
103
-
```
116
+
```bash
117
+
python sdutil
118
+
```
104
119
105
-
If no arguments are specified, this menu will be displayed:
120
+
If no arguments are specified, this menu will be displayed:
106
121
107
-
```code
108
-
Seismic Store Utility
109
-
110
-
> python sdutil [command]
111
-
112
-
available commands:
113
-
114
-
* auth : authentication utilities
115
-
* unlock : remove a lock on a seismic store dataset
116
-
* version : print the sdutil version
117
-
* rm : delete a subproject or a space separated list of datasets
118
-
* mv : move a dataset in seismic store
119
-
* config : manage the utility configuration
120
-
* mk : create a subproject resource
121
-
* cp : copy data to(upload)/from(download)/in(copy) seismic store
122
-
* stat : print information like size, creation date, legal tag(admin) for a space separated list of tenants, subprojects or datasets
123
-
* patch : patch a seismic store subproject or dataset
124
-
* app : application authorization utilities
125
-
* ls : list subprojects and datasets
126
-
* user : user authorization utilities
127
-
```
122
+
```code
123
+
Seismic Store Utility
124
+
125
+
> python sdutil [command]
126
+
127
+
available commands:
128
+
129
+
* auth : authentication utilities
130
+
* unlock : remove a lock on a seismic store dataset
131
+
* version : print the sdutil version
132
+
* rm : delete a subproject or a space separated list of datasets
133
+
* mv : move a dataset in seismic store
134
+
* config : manage the utility configuration
135
+
* mk : create a subproject resource
136
+
* cp : copy data to(upload)/from(download)/in(copy) seismic store
137
+
* stat : print information like size, creation date, legal tag(admin) for a space separated list of tenants, subprojects or datasets
138
+
* patch : patch a seismic store subproject or dataset
139
+
* app : application authorization utilities
140
+
* ls : list subprojects and datasets
141
+
* user : user authorization utilities
142
+
```
128
143
129
-
At first usage time, the utility required to be initialized by invoking the sdutil config init command.
144
+
2. If this is your first time using the tool, you must run the sdutil config init command to initialize the configuration.
130
145
131
-
```bash
132
-
python sdutil config init
133
-
```
146
+
```bash
147
+
python sdutil config init
148
+
```
134
149
135
-
Before start using the utility and perform any operation, you must sign-in the system. When you run the following sign-in command, sdutil will open a sign-in page in a web browser.
150
+
3.Before you start using the utility and performing any operations, you must signin the system. When you run the following signin command, sdutil will open a signin page in a web browser.
136
151
137
-
```bash
138
-
python sdutil auth login
139
-
```
152
+
```bash
153
+
python sdutil auth login
154
+
```
140
155
141
-
Once you've successfully logged in, your credentials will be valid for a week. You don't need to sign in again unless the credentials expired (after one week), in this case the system will require you to sign in again.
156
+
Once you've successfully logged in, your credentials will be valid for a week. You don't need to sign in again unless the credentials expired (after one week), in this case the system will require you to sign in again.
142
157
143
-
> [!NOTE]
144
-
> If you aren't getting the "sign-in Successful!" message, make sure your three environment variables are set and you've followed all steps in the "Configuration" section above.
158
+
> [!NOTE]
159
+
> If you aren't getting the "signin Successful!" message, make sure your three environment variables are set and you've followed all steps in the "Configuration" section above.
145
160
146
161
## Seistore Resources
147
162
@@ -173,7 +188,7 @@ Every resource can be addressed by using the corresponding sdpath section
173
188
174
189
## Subprojects
175
190
176
-
A subproject in Seismic Store is a working unit where datasets can be saved. The system can handles multiple subprojects under a tenant project.
191
+
A subproject in Seismic Store is a working unit where datasets can be saved. The system can handle multiple subprojects under a tenant project.
177
192
178
193
A subproject resource can be created by a **Tenant Admin Only** with the following sdutil command:
179
194
@@ -192,7 +207,7 @@ A subproject resource can be created by a **Tenant Admin Only** with the followi
192
207
193
208
## Users Management
194
209
195
-
To be able to use seismic store, a user must be registered/added to at least a subproject resource with a role that defines their access level. Seismic Store support three different roles scoped at subproject level:
210
+
To be able to use seismic store, a user must be registered to at least a subproject resource with a role that defines their access level. Seismic store supports two different roles scoped at subproject level:
196
211
197
212
-**admin**: read/write access + users management.
198
213
-**viewer**: read/list access
@@ -212,7 +227,7 @@ A user can be registered by a **Subproject Admin Only** with the following sduti
212
227
213
228
## Usage Examples
214
229
215
-
An example of how to use sdutil to manage datasets with seismic store. For this example, we'll use sd://gtc/carbon as subproject resource
230
+
The following is an example of how to use sdutil to manage datasets with the seismic store. For this example, `sd://gtc/carbon` is used as the subproject resource
216
231
217
232
```bash
218
233
# create a new file
@@ -270,41 +285,41 @@ Regression tests
270
285
271
286
**How can I generate a new utility command?**
272
287
273
-
run the command generation script (`./command_gen.py`) to automatically generate the base infrastructure for integrate new command in the sdutil utility. A folder with the command infrastructure will be created in sdlib/cmd/new_command_name
288
+
Run the command generation script (`./command_gen.py`) to automatically generate the base infrastructure for integrate new command in the sdutil utility. A folder with the command infrastructure will be created in sdlib/cmd/new_command_name
274
289
275
290
```bash
276
291
./scripts/command_gen.py new_command_name
277
292
```
278
293
279
-
How can I delete all files in a directory?
294
+
**How can I delete all files in a directory?**
280
295
281
296
```bash
282
297
./sdutil ls -lr sd://tenant/subproject/your/folder/here | xargs -r ./sdutil rm --idtoken=x.xxx.x
283
298
```
284
299
285
300
**How can I generate the utility changelog?**
286
301
287
-
run the changelog script (`./changelog-generator.sh`) to automatically generate the utility changelog
302
+
Run the changelog script (`./changelog-generator.sh`) to automatically generate the utility changelog
288
303
289
304
```bash
290
305
./scripts/changelog-generator.sh
291
306
```
292
307
293
308
## Setup and usage for Microsoft Energy Data Services
294
309
295
-
Below steps are for windows subsystem linux - ubuntu 20.04
310
+
Below steps are for Windows Subsystem for Linux - Ubuntu 20.04
296
311
Microsoft Energy Data Services instance is using OSDU™ M12 Version of sdutil
297
312
298
-
- Download the source code from community [sdutil](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil/-/tree/azure/stable/) Azure Stable branch.
313
+
1. Download the source code from community [sdutil](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil/-/tree/azure/stable/) Azure Stable branch.
299
314
300
-
- In case python virtual env isn't installed, use below commands else skip to next section
315
+
2. In case python virtual env isn't installed, use below commands. Otherwise, skip to next section
301
316
302
317
```bash
303
318
sudo apt-get update
304
319
sudo apt-get install python3-venv
305
320
```
306
321
307
-
- create new venv and install package
322
+
3. Create a new virtual environment and install package
308
323
309
324
```bash
310
325
#create new virtual env with name : sdutilenv
@@ -317,62 +332,81 @@ Microsoft Energy Data Services instance is using OSDU™ M12 Version of sdut
317
332
pip install -r requirements.txt
318
333
```
319
334
320
-
- replace/edit config.yaml in sdlib/config.yaml by this [config-azure.yaml](https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-sdutil/-/blob/azure/stable/docs/config-azure.yaml)
335
+
4. Replace the contents of `config.yaml` in the `sdlib` folder with the following yaml and fill in the three templatized values (tow `<meds-instance-url>` and `<put refresh token here...>`):
321
336
322
-
- You need to Update three values in `config.yaml`:
> Don't use `cp` command to download VDS files. The VDS conversion results in multiple files, therefore the `cp` command won't be able to download all of them in one command. Use either the [SEGYExport](https://osdu.pages.opengroup.org/platform/domain-data-mgmt-services/seismic/open-vds/tools/SEGYExport/README.html) or [VDSCopy](https://osdu.pages.opengroup.org/platform/domain-data-mgmt-services/seismic/open-vds/tools/VDSCopy/README.html) tool instead. These tools use a series of REST calls accessing a [naming scheme](https://osdu.pages.opengroup.org/platform/domain-data-mgmt-services/seismic/open-vds/connection.html) to retrieve information about all the resulting VDS files.
0 commit comments