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: README.md
+50-12Lines changed: 50 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,10 @@ Storing and reading BLOBs to and from a cloud service.
7
7
* OpenSSL
8
8
9
9
# Releases and Downloads
10
-
11
10
See [Releases](https://github.com/Karm/mod_cloud_storage/releases)
12
11
13
12
# Usage
14
-
15
-
The command line tool is controlled via env variables and command line arguments. Command line arguments take priority and overwrite env variables settings.
13
+
The command line tool is controlled via env variables and command line arguments. Command line arguments take priority and overwrite env variables settings. If the action is set to *WRITE_BLOB* and neither *MCS_PATH_TO_FILE* nor *--path_to_file* are specified, the command line tool tries to read from stdin.
16
14
17
15
## Env variables
18
16
```
@@ -37,12 +35,14 @@ MCS_TEST_REGIME=true|false
37
35
--blob_store_url
38
36
--test_regime
39
37
```
40
-
41
-
*Only LIST_BLOBS and CREATE_CONTAINER are implemented at the moment.*
38
+
*Only **LIST_BLOBS**, **CREATE_CONTAINER** and **WRITE_BLOB** are implemented at the moment.*
42
39
43
40
## Testing and fooling around
44
-
* Get your [Azurite container up and running](https://github.com/arafato/azurite#docker-image):
41
+
* On Linux, get your [Azurite docker container](https://github.com/arafato/azurite#docker-image) up and running
42
+
* On Windows, install [Azure Storage Emulator](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator?toc=%2fazure%2fstorage%2fqueues%2ftoc.json)
43
+
* Use either *--test_regime true* parameter or *MCS_TEST_REGIME=true* env var as depicted in the examples below
45
44
45
+
### Creating a container
46
46
```
47
47
./mod_cloud_storage \
48
48
--action CREATE_CONTAINER \
@@ -52,11 +52,49 @@ MCS_TEST_REGIME=true|false
52
52
--blob_store_url 127.0.0.1:10000 \
53
53
--test_regime true
54
54
```
55
+
Note the storage account is always called devstoreaccount1 by definition in all Azure Storage emulator implementations. The same holds for the storage key. Container and blob names are arbitrary.
Note the tool is reading from stdin via pipe now *...< /tmp/test*. One could use either *MCS_PATH_TO_FILE* env var or *--path_to_file* parameter instead. If all aforementioned is specified, *parameter* takes precedence over *env var* and env var takes precedence over *stdin*.
55
69
56
70
## Working with real Azure storage
57
-
* See Azure Portal and Azure Docs on creating Storage Account
58
-
* Copy your access key from your Azure Portal
59
-
* set test_regime to false or leave it blank
60
-
* set blob_store_url to blob.core.windows.net
61
-
* set azure_storage_account to your actual storage account name
62
-
**Do not use a storage account with valuable containers in it. This tool is just a toy.*
71
+
*[Create your Azure profile](https://azure.microsoft.com/en-us/free/) if you don't have one.
72
+
* Create a Storage account if you don't have one, Name, Resource group, all arbitrary. If you need help with this terminology, read [Azure Storage manual](https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction). In this example, we use new Storage account **karmdelete**.<br>
0 commit comments