Run go fmt over bpa-operator
[icn.git] / cmd / bpa-restapi-agent / README.md
index 70555cb..a3300c0 100644 (file)
@@ -1,9 +1,6 @@
 ### Running the server
 To run the server, follow these simple steps:
 
-```
-go run main.go
-```
 Integrated Cloud Native (ICN) RESTful API
 
 This is a Golang application providing a RESTful API to interact with and upload image objects.
@@ -185,3 +182,30 @@ Request
 curl -i -X DELETE http://localhost:9015/v1/baremetalcluster/alpha/beta/container_images/asdf246
 
 Response
+
+# Cloud Storage with MinIO
+
+Start MinIO server daemon with docker command before running REST API agent,
+default settings in config/config.go.
+AccessKeyID: ICN-ACCESSKEYID
+SecretAccessKey: ICN-SECRETACCESSKEY
+MinIO Port: 9000
+
+You can setup MinIO server my the following command with default credentials.
+```
+$ docker run -p 9000:9000 --name minio1 \
+  -e "MINIO_ACCESS_KEY=ICN-ACCESSKEYID" \
+  -e "MINIO_SECRET_KEY=ICN-SECRETACCESSKEY" \
+  -v /mnt/data:/data \
+  minio/minio server /data
+```
+Also there is a Kubernetes deployment for MinIO server in standalone mode.
+```
+$ cd deploy/kud-plugin-addons/minio
+$ ./install.sh
+```
+You can check the status by opening a browser: http://127.0.0.1:9000/
+
+MinIO Client implementation integrated in REST API agent and will automatically
+initialize in main.go, and create 3 buckets: binary, container, operatingsystem.
+The Upload image will "PUT" to corresponding buckets by HTTP PATCH request url.