generated from biigle/module
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from biigle/patch-1
Remove the aruna disk type
- Loading branch information
Showing
10 changed files
with
145 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/Database/migrations/2024_02_26_110100_remove_aruna_type.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
use Biigle\Modules\UserDisks\UserDisk; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
UserDisk::where('type', 'aruna')->delete(); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
// | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<h4><a name="aos"></a>Aruna Object Storage</h4> | ||
|
||
<p> | ||
The <a href="https://aruna-storage.org/">Aruna Object Storage</a> (AOS) is a storage service for the German initiative for a national research data infrastructure (<a href="https://www.nfdi.de/">NFDI</a>). Before you can start using AOS, you have to sign up for a user account on the <a href="https://aruna-storage.org/">website</a>. | ||
</p> | ||
|
||
<p> | ||
While the connection to AOS can be established via the same S3 protocol that is described above, the setup and configuration works a little differently. Here is a description of the S3 options for AOS: | ||
</p> | ||
|
||
<dl> | ||
<dt>Bucket name</dt> | ||
<dd> | ||
<p> | ||
The name of your AOS project. | ||
</p> | ||
</dd> | ||
|
||
<dt>Endpoint</dt> | ||
<dd> | ||
<p> | ||
The endpoint is the URL <code>https://<bucket>.data.gi.aruna-storage.org</code> where <code><bucket></code> is replaced with the bucket name above. | ||
</p> | ||
</dd> | ||
|
||
<dt>Access key</dt> | ||
<dd> | ||
<p> | ||
The "AccessKey" that is provided with new data proxy credentials. | ||
</p> | ||
</dd> | ||
|
||
<dt>Secret key</dt> | ||
<dd> | ||
<p> | ||
The "SecretKey" that is provided with new data proxy credentials. | ||
</p> | ||
</dd> | ||
</dl> | ||
|
||
<p> | ||
Detailed setup instructions: | ||
</p> | ||
|
||
<ol> | ||
<li> | ||
<p> | ||
Log in to the <a href="https://dev.aruna-storage.org">AOS dashboard</a>, select "Explore" and then "Resources" in the menu at the top. | ||
</p> | ||
</li> | ||
<li> | ||
<p> | ||
Click on the "Create new" button and create a new project (we call it "myproject" here). The project name is the value of the <strong>Bucket name</strong> field that is required to create the new storage disk. With the project name you can also fill the <strong>Endpoint</strong> field. | ||
</p> | ||
</li> | ||
<li> | ||
<p> | ||
Now select "Access" and then "Data proxies" in the AOS menu at the top. Choose a data proxy where you would like to store your data. There, click on the "Create Credential" button. The AccessKey is the value of the <strong>Access key</strong> field and the SecretKey is the value of the <strong>Secret key</strong> field that is required to create the new storage disk. | ||
</p> | ||
</li> | ||
</ol> | ||
|
||
<p> | ||
Now you have the values for all fields that are required to create the new storage disk. However, one more step is required before you can annotate your data without restrictions in BIIGLE. You have to configure "Cross-origin resource sharing (CORS)". This is done as follows: | ||
</p> | ||
|
||
<ol> | ||
<li> | ||
<p> | ||
Install <code>s3cmd</code> and run <code>s3cmd --configure</code>. Enter the access key and secret key from above. Don't change the default region. Enter the S3 endpoint <code>data.gi.aruna-storage.org</code> and the bucket template <code>%(bucket)s.data.gi.aruna-storage.org</code>. Leave the remaining options unchanged. Don't run the test with the supplied credentials and save the settings. | ||
</p> | ||
</li> | ||
<li> | ||
<p> | ||
Create a file called <code>cors.xml</code> with the following content: | ||
</p> | ||
<pre> | ||
<CORSConfiguration> | ||
<CORSRule> | ||
<AllowedOrigin>{{url('/')}}</AllowedOrigin> | ||
<AllowedMethod>GET</AllowedMethod> | ||
<AllowedHeader>*</AllowedHeader> | ||
<MaxAgeSeconds>30</MaxAgeSeconds> | ||
</CORSRule> | ||
</CORSConfiguration> | ||
</pre> | ||
<p> | ||
Then run the following command: <code>s3cmd setcors cors.xml s3://myproject</code> (you should replace "myproject" with the actual name of your project). That's it. Now CORS is configured for your project. | ||
</p> | ||
</li> | ||
</ol> | ||
|
||
<p> | ||
Here is a brief example for how you can upload files to your project. This is also done with <code>s3cmd</code>; | ||
</p> | ||
|
||
<ol> | ||
<li> | ||
<p> | ||
Make sure <code>s3cmd</code> is configured as described above. | ||
</p> | ||
</li> | ||
<li> | ||
<p> | ||
Now navigate to the parent of the directory that you want to upload. Upload the whole directory with the following command (replace "mydir" with the name of the directory to upload and "myproject" with the name of your project): | ||
</p> | ||
<pre>s3cmd put -r mydir s3://myproject/</pre> | ||
<p> | ||
The directory will be created as a new dataset as part of your AOS project. In BIIGLE, you will see it as a directory in the file browser. | ||
</p> | ||
</li> | ||
</ol> | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.