Professional Documents
Culture Documents
Release 7.0.0
Foo
1 Zenko 1
1.1 May I offer you some lovely documentation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 Testing Zenko . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Zenko in Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
i
ii
CHAPTER 1
Zenko
1.2 Contributing
1.3 Overview
This repository includes installation resources to deploy the full Zenko stack over different orchestration systems.
Currently we have Kubernetes and Docker Swarm.
1
Zenko Documentation, Release 7.0.0
2 Chapter 1. Zenko
CHAPTER 2
This Docker service stack describes a simple Zenko setup for quick testing with non-production data.
2.1 Preparing
Swarm mode must be enabled on the local Docker daemon. See this tutorial for more on Swarm mode.
2.2 Deploying
2.3 Testing
3
Zenko Documentation, Release 7.0.0
$ export AWS_ACCESS_KEY_ID=accessKey1
$ export AWS_SECRET_ACCESS_KEY=verySecretKey1
$ aws s3 --endpoint http://localhost mb s3://bucket1 --region=us-east-1
make_bucket: bucket1
$ aws s3 --endpoint http://localhost ls
2017-06-15 16:42:58 bucket1
$ aws s3 --endpoint http://localhost cp README.md s3://bucket1
upload: ./README.md to s3://bucket1/README.md
$ aws s3 --endpoint http://localhost ls s3://bucket1
2017-06-15 17:36:10 1510 README.md
Note: This stack’s metadata engine has been switched to MongoDB. Updating from a previous version initializes and
puts into use a new database instead of using your existing data.
This Docker service stack describes a simple Zenko production setup, including:
• An nginx-based load balancer on all nodes of the swarm
• Multi-tiered networks (user-facing, DMZ and backend services)
• Thanks to Docker Swarm and its overlay network, virtual ips and a scheduler, high availability and service
resiliency (storage node excluded).
3.1 Preparing
3.1.1 Swarm
Swarm mode must be enabled on the local Docker daemon. See this tutorial for more on Swarm mode.
Because we are using direct filesystem storage, there is no replication of the actual data. One specific node in the
swarm must be selected for storage.
As this storage node is responsible for the data, it’s best to put the storage directories on fast, reliable disks. A
backup/restore policy is also highly recommended.
From a manager node, locate the node that will host the data and metadata:
$ docker node ls
ID HOSTNAME STATUS
˓→AVAILABILITY MANAGER STATUS
emuws4813jejap6a22n2sk10n s3-node-zenko-swarm-4.na.scality.cloud Ready Active
(continues on next page)
5
Zenko Documentation, Release 7.0.0
Note: If you skip this step, some services in the stack will remain pending and will never be scheduled.
By default, the stack registers itself at the Zenko Orbit portal and uploads anonymous stats. Zenko Orbit allows easy
configuration of users, remote storage locations, replication and more, as well as instance monitoring.
To opt out of remote management and monitoring, export this environment variable before deployment:
$ export REMOTE_MANAGEMENT_DISABLE=1
$ docker stack deploy -c docker-stack.yml zenko-prod
[...]
$ export ENDPOINT=s3.mydomain.com
3.2 Deployment
Note: Having 0 replicas of the mongodb-init service is fine, because it is expected to execute successfully only once
to initialize the mongodb replica set.
3.2. Deployment 7
Zenko Documentation, Release 7.0.0
To get your instance’s Zenko Orbit identifier and claim it in the portal, issue this command:
3.4 Testing
To use the tests folder, update the credentials in Zenko/tests/utils/s3SDK.js with credentials generated
in Zenko Orbit. Install node modules with npm install. Then, run npm test.
You can use awscli to perform S3 operations on the Zenko stack. Because the load balancer container is deployed in
global mode, we can use any of the swarm nodes as the endpoint.
For the default zenko host name, substitute either the ENDPOINT variable configured above (if applicable), or what-
ever the hostname -f command returns.
IMPORTANT: When default port 80 is in use, it must never be specified after the endpoint address. Any
custom port in use must be specified.
$ export AWS_ACCESS_KEY_ID=deployment-specific-access-key
$ export AWS_SECRET_ACCESS_KEY=deployment-specific-secret-key
$ aws s3 --endpoint http://zenko mb s3://bucket1 --region=us-east-1
make_bucket: bucket1
$ aws s3 --endpoint http://zenko ls
2017-06-20 00:12:14 bucket1
$ aws s3 --endpoint http://zenko cp README.md s3://bucket1
upload: ./README.md to s3://bucket1/README.md
$ aws s3 --endpoint http://zenko ls s3://bucket1
2017-06-20 00:12:53 5052 README.md
This section of documentation will help you register your Zenko instance on Orbit, for either minikube-based or
MetalK8s-based or Docker Swarm-based deployments.
For minikube:
$ minikube dashboard
A new tab should open in your browser, taking you to the Kubernetes dashboard.
For MetalK8s:
$ kubectl proxy
From the dashboard, click on the cloudserver-front service, and then on one of the pods running for that service. On
the top right menu, click “Logs”, and then do a search of “instance ID” - you should find a line in the logs giving you a
11
Zenko Documentation, Release 7.0.0
long string of random characters: this is your instance id, copy it. If you cannot find such a line in the logs, try option
B.
From the dashboard, click on the mongodb-replicaset service, and then on the pod that is mongodb-replicaset-0. For
fresh deployments, the pod 0 should be the MongoDB master, and note MongoDB can only be queried from the master
pod.
TIP: if the following procedure doesn’t work for you, and you get an error like "not master and
slaveOk=false", it means the pod inside which you are executing those commands is not the master.
In that case, simply use db.isMaster.primary to find the master node, execute the procedure inside
that node.
Then hit “Exec”, in the top right menu of the dashboard, and use the CLI to query MongoDB as follows
$ mongo
MongoDB shell version v3.4.15
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.15
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2018-05-25T15:44:08.084+0000 I STORAGE [initandlisten]
2018-05-25T15:44:08.084+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS
˓→filesystem is strongly recommended with the WiredTiger storage engine
In this json object, you can find your instance ID in the value dictionary.
Go to Orbit’s homepage, hit “Get Started”, and log in with your Google Account (we comply with GDPR regulations).
You will be welcomed by a charming astronaut fox, offering you to take a tour, or to install now. Feel free to take the
tour to discover all of Orbit’s capabilities, or hit “Install Now” if you can’t wait! You will land on this page:
You’re all set! Enjoy Orbit and Zenko, and reach out on the forum if you need anything!
Find your CloudServer frontend service in your zenko stack, and search its logs:
˓→Instance ID is "abc12345-5689-4f15-b0e6-5a9c17e7ae01","hostname":"843d31bf15f0","pid
˓→":28}
Go to Orbit’s homepage, hit “Get Started”, and log in with your Google Account (we comply with GDPR regulations).
You will be welcomed by a charming astronaut fox, offering you to take a tour, or to install now. Feel free to take the
tour to discover all of Orbit’s capabilities, or hit “Install Now” if you can’t wait! You will land on this page:
You’re all set! Enjoy Orbit and Zenko, and reach out on the forum if you need anything!