Skip to content

Commit

Permalink
Update exercise_allas.md
Browse files Browse the repository at this point in the history
  • Loading branch information
EetuHuuskoCSC authored Oct 2, 2024
1 parent d906265 commit 61244e4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions materials/exercise_allas.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Learn how to:

:::{admonition} Change the default project and username

* `project_200xxxx` is an example project name, replace with your own CSC project name.
* `project_20xxxxx` is an example project name, replace with your own CSC project name.
* `cscusername` is an example username, replace with your username.
:::

Expand All @@ -54,38 +54,38 @@ allas-conf --mode s3cmd
# Create a new bucket
# s3cmd mb <name_of_your_bucket>
s3cmd mb s3://project_200xxxx-cscusername
s3cmd mb s3://project_20xxxxx-cscusername
# Upload (later syncronize) a folder to Allas
# s3cmd sync <local_folder> s3://<name_of_your_bucket>
s3cmd sync /appl/data/geo/mml/dem10m/2019/W3/W33/ s3://project_200xxxx-cscusername
s3cmd sync /appl/data/geo/mml/dem10m/2019/W3/W33/ s3://project_20xxxxx-cscusername
# List all buckets
s3cmd ls
# List all files in one bucket
# s3cmd ls s3://<name_of_your_bucket>
s3cmd ls s3://project_200xxxx-cscusername
s3cmd ls s3://project_20xxxxx-cscusername
# Read and write directly to Allas with GDAL
# Make GDAL avaialble
module load geoconda
# See metadata of a file from GDAL exercise
gdalinfo /vsis3/project_200xxxx-cscusername/W3333.tif
gdalinfo /vsis3/project_20xxxxx-cscusername/W3333.tif
# Enable writing with GDAL
export CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE=YES
# Make the .tif file to Cloud-Optimized GeoTiff
gdal_translate /vsis3/project_200xxxx-cscusername/W3333.tif /vsis3/project_200xxxx-cscusername/W3333_COG.tif -of COG
gdal_translate /vsis3/project_20xxxxx-cscusername/W3333.tif /vsis3/project_20xxxxx-cscusername/W3333_COG.tif -of COG
# See metadata of the new file
gdalinfo /vsis3/project_200xxxx-cscusername/W3333_COG.tif
gdalinfo /vsis3/project_20xxxxx-cscusername/W3333_COG.tif
# Delete all from Allas
s3cmd del --recursive --force s3://project_200xxxx-cscusername
s3cmd rm s3://project_200xxxx-cscusername
s3cmd rm s3://project_20xxxxx-cscusername
```

:::{admonition} Key points
Expand Down

0 comments on commit 61244e4

Please sign in to comment.