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
{{ message }}
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
#Ubiquity Storage Service for Container Ecosystems
1
+
#Ubiquity Storage Service for Container Ecosystems
2
2
Ubiquity provides access to persistent storage for Docker containers in Docker or Kubernetes ecosystems. The REST service can be run on one or more nodes in the cluster to create, manage, and delete storage volumes.
3
3
4
-
Ubiquity can support any number of storage backends. See 'Available Storage Systems' for more details.
4
+
Ubiquity is a pluggable framework that can support a variety of storage backends. See 'Available Storage Systems' for more details.
5
+
6
+
This code is provided "AS IS" and without warranty of any kind. Any issues will be handled on a best effort basis.
5
7
6
8
## Sample Deployment Options
7
9
The service can be deployed in a variety of ways. In all options though, Ubiquity must be
@@ -24,12 +26,17 @@ This deployment shows a Kubernetes pod or cluster as well as a Docker Swarm clus
24
26
25
27
This is identical to the previous deployment example except that the Kubernetes or Docker Swarm hosts are using NFS to access their volumes. Note that a typical Spectrum Scale deployment would have several CES NFS servers (protocol servers) and the Ubiquity service could be installed on one of those servers or on a separate management server (such as the node collecting Zimon stats or where the GUI service is installed).
26
28
29
+
#### Multi-node using Native GPFS(POSIX) and Docker Swarm
30
+
31
+
In this deployment, the Ubiquity service is installed and running on a single Spectrum Scale server. [Ubiquity Docker Plugin](https://github.com/IBM/ubiquity-docker-plugin) is installed and running on all nodes (Docker Hosts that are acting as clients to the Spectrum Scale Storage Cluster) that are part of the Docker Swarm cluster, including the Swarm Manager and the Worker Nodes. The Ubiquity Docker Plugin, running on all the Swarm Nodes, must be configured to point to the single instance of Ubiquity service running on the Spectrum Scale server.
32
+
27
33
## Installation
28
34
### Build Prerequisites
29
35
* Install [golang](https://golang.org/) (>=1.6)
30
-
* Install git (if accessing source code from github)
* Configure go - GOPATH environment variable needs to be correctly set before starting the build process. Create a new directory and set it as GOPATH
39
+
33
40
### Deployment Prerequisites
34
41
Once the Ubiquity binary is built, then the only requirements on the node where it is deployed is that the Ubiquity service has access to a deployed storage service that will be used by the containers. The type of access Ubiquity needs to the storage service depends on the storage backend that is being used. See 'Available Storage Systems' for more details.
* configFile: Configuration file to use (defaults to `./ubiquity-server.conf`)
77
77
78
78
### Configuring the Ubiquity Service
79
79
80
80
Unless otherwise specified by the `configFile` command line parameter, the Ubiquity service will
81
81
look for a file named `ubiquity-server.conf` for its configuration.
82
82
83
-
The following snippet shows a sample configuration file:
83
+
The following snippet shows a sample configuration file in the case where Ubiquity service is deployed on a system with native access (CLI) to the Spectrum Scale Storage system.
84
+
85
+
Note that the file system chosen for where to store the DB that tracks volumes is important. Ubiquity uses a sqllite db, and so can support any storage location that sqllite supports. This can be a local file system such as Ext4, NFS (if exclusive access is ensured from a single host), or a parallel file system such as Spectrum Scale. In our example above, we are storing the DB in Spectrum Scale to support failover as well as provide availability and durability of the db data.
86
+
84
87
85
88
```toml
86
-
port = 9999# The TCP port to listen on
87
-
logPath = "/var/log/ubiquity"# The Ubiquity service will write logs to file "ubiquity.log" in this path. This path must already exist.
89
+
port = 9999# The TCP port to listen on
90
+
logPath = "/tmp/ubiquity"# The Ubiquity service will write logs to file "ubiquity.log" in this path. This path must already exist.
91
+
defaultBackend = "spectrum-scale"# The "spectrum-scale" backend will be the default backend if none is specified in the request
88
92
89
-
[SpectrumConfig] # If this section is specified, the "spectrum-scale" backend will be enabled.
90
-
defaultFilesystem = "gold"# Default name of Spectrum Scale file system to use if user does not specify one during creation of a volume. This file system must already exist.
91
-
configPath = "/gpfs/gold/config"# Path in an existing filesystem where Ubiquity can create/store volume DB.
93
+
[SpectrumScaleConfig] # If this section is specified, the "spectrum-scale" backend will be enabled.
94
+
defaultFilesystem = "gold"# Default name of Spectrum Scale file system to use if user does not specify one during creation of a volume. This file system must already exist.
95
+
configPath = "/gpfs/gold/config"# Path in an existing filesystem where Ubiquity can create/store volume DB.
92
96
nfsServerAddr = "CESClusterHost"# IP/hostname of Spectrum Scale CES NFS cluster. This is the hostname that NFS clients will use to mount NFS volumes. (required for creation of NFS accessible volumes)
93
97
98
+
# Controls the behavior of volume deletion. If set to true, the data in the the storage system (e.g., fileset, directory) will be deleted upon volume deletion. If set to false, the volume will be removed from the local database, but the data will not be deleted from the storage system. Note that volumes created from existing data in the storage system should never have their data deleted upon volume deletion (although this may not be true for Kubernetes volumes with a recycle reclaim policy).
99
+
forceDelete = false
94
100
```
95
101
96
-
Note that the file system chosen for where to store the DB that tracks volumes is important. Ubiquity uses a sqllite db, and so can support any storage location that sqllite supports. This can be a local file system such as Ext4, NFS (if exclusive access is ensured from a single host), or a parallel file system such as Spectrum Scale. In our example above, we are storing the DB in Spectrum Scale to both allow access from multiple hosts (Ubiquity will ensure consistency across hosts to the parallel file system) as well as provide availability and durability of the data.
102
+
To support running the Ubiquity service on a host (or VM or container) that doesn't have direct access to the Spectrum Scale CLI, also add the following items to the config file to have Ubiquity use password-less SSH access to the Spectrum Scale Storage system:
97
103
98
-
### Next Steps
99
-
To use Ubiquity, please install appropriate storage-specific plugin ([docker](https://github.com/IBM/ubiquity-docker-plugin), [kubernetes](https://github.com/IBM/ubiquity-flexvolume))
104
+
```toml
105
+
[SpectrumScaleConfig.SshConfig] # If this section is specified, then the "spectrum-scale" backend will be accessed via SSH connection
106
+
user = "ubiquity"# username to login as on the Spectrum Scale storage system
107
+
host = "my_ss_host"# hostname of the Spectrum Scale storage system
108
+
port = "22"# port to connect to on the Spectrum Scale storage system
109
+
```
100
110
101
-
## Additional Considerations
102
-
### High-Availability
103
-
Currently, handling failures of the Ubiquity service must be done manually, although there are several possible options.
111
+
### Two Options to Install and Run
104
112
105
-
The Ubiquity service can be safely run on multiple nodes, either in an active-active or active-passive manner. Failover can then be manually achieved by switching the Ubiquity service hostname, or automatically through use of a HTTP load balancer.
113
+
#### Option 1: systemd
114
+
This option assumes that the system that you are using has support for systemd (e.g., ubuntu 14.04 does not have native support to systems, ubuntu 16.04 does.)
106
115
107
-
Moving forward, we will leverage Docker or K8s specific mechanisms to achieving high-availability by running the Ubiquity service in containers or a pod.
116
+
1) Inside the almaden-containers/ubiquity/scripts directory, execute the following command
117
+
```bash
118
+
./setup
119
+
```
120
+
121
+
This command will copy binary ubiquity to /usr/bin, ubiquity-server.conf and ubiquity-server.env to /etc/ubiquity location. It will also enable Ubiquity service using "systemctl enable"
122
+
123
+
2) Make appropriate changes to /etc/ubiquity/ubiquity-server.conf
124
+
125
+
3) Edit /etc/ubiquity/ubiquity-server.env to add/remove command line options to ubiquity server
126
+
127
+
4) Once above steps are done we can start/stop ubiquity server using systemctl command as below
128
+
```bash
129
+
systemctl start/stop/restart ubiquity
130
+
```
131
+
132
+
#### Option 2: Manual
133
+
```bash
134
+
./bin/ubiquity [-configFile <configFile>]
135
+
```
136
+
where:
137
+
* configFile: Configuration file to use (defaults to `./ubiquity-server.conf`)
108
138
109
-
### Scalability
110
-
Running the Ubiquity service on a single server will most likely provide sufficient performance. But if not, it can be run on multiple nodes and load balancing can be achieved through use of a HTTP load balancer or round-robin DNS service.
139
+
140
+
### Next Steps - Install a plugin for Docker or Kubernetes
141
+
To use Ubiquity, please install appropriate storage-specific plugin ([docker](https://github.com/IBM/ubiquity-docker-plugin), [kubernetes](https://github.com/IBM/ubiquity-flexvolume))
111
142
112
143
## Available Storage Systems
144
+
113
145
### IBM Spectrum Scale
114
146
With IBM Spectrum Scale, containers can have shared file system access to any number of containers from small clusters of a few hosts up to very large clusters with thousands of hosts.
115
147
116
148
The current plugin supports the following protocols:
117
-
* Native POSIX Client
118
-
* CES NFS (Scalable and Clustered NFS Exports)
149
+
* Native POSIX Client (backend=spectrum-scale)
150
+
* CES NFS (Scalable and Clustered NFS Exports) (backend=spectrum-scale-nfs)
151
+
152
+
**Note** that if option backend is not specified to Docker as an opt parameter, or to Kubernetes in the yaml file, the backend defaults to server side default specification.
153
+
154
+
Spectrum Scale supports the following options for creating a volume. ther the native or NFS driver is used, the set of options is exactly the same. They are passed to Docker via the 'opt' option on the command line as a set of key-value pairs.
155
+
156
+
Note that POSIX volumes are not accessible via NFS, but NFS volumes are accessible via POSIX. This is because NFS requires the additional step of exporting the dataset on the storage server. To make a POSIX volume accessible via NFS, simply create the volume using the 'spectrum-scale-nfs' backend using the same path or fileset name.
157
+
158
+
159
+
#### Supported Volume Types
160
+
161
+
The volume driver supports creation of two types of volumes in Spectrum Scale:
162
+
163
+
***1. Fileset Volume (Default)***
164
+
165
+
Fileset Volume is a volume which maps to a fileset in Spectrum Scale. By default, this will create a dependent Spectrum Scale fileset, which supports Quota and other Policies, but does not support snapshots. If snapshots are required, then a independent volume can also be requested. Note that there are limits to the number of filesets that can be created, please see Spectrum Scale docs for more info.
166
+
167
+
Usage: type=fileset
168
+
169
+
***2. Independent Fileset Volume***
170
+
171
+
Independent Fileset Volume is a volume which maps to an independent fileset, with its own inode space, in Spectrum Scale.
172
+
173
+
Usage: type=fileset, fileset-type=independent
174
+
175
+
***3. Lightweight Volume***
176
+
177
+
Lightweight Volume is a volume which maps to a sub-directory within an existing fileset in Spectrum Scale. The fileset could be a previously created 'Fileset Volume'. Lightweight volumes allow users to create unlimited numbers of volumes, but lack the ability to set quotas, perform individual volume snapshots, etc.
178
+
179
+
To use Lightweight volumes, but take advantage of Spectrum Scale features such a encryption, simply create the Lightweight volume in a Spectrum Scale fileset that has the desired features enabled.
119
180
120
-
POSIX and NFS Volumes are be created separately by choosing the 'spectrum-scale' volume driver or the 'spectrum-scale-nfs' volume driver. Note that POSIX volumes are not accessible via NFS, but, NFS volumes are accessible via POSIX. To make a POSIX volume accessible via NFS, simply create the volume using the 'spectrum-scale-nfs' driver using the same path or fileset name.
181
+
[**Note**: Support for Lightweight volume with NFS is experimental]
121
182
122
-
### Ubiquity Access to IBM Spectrum Scale
183
+
Usage: type=lightweight
184
+
185
+
#### Supported Volume Creation Options
186
+
187
+
**Features**
188
+
* Quotas (optional) - Fileset Volumes can have a max quota limit set. Quota support for filesets must be already enabled on the file system.
189
+
* Usage: quota=(numeric value)
190
+
* Docker usage example: --opt quota=100M
191
+
* Ownership (optional) - Specify the userid and groupid that should be the owner of the volume. Note that this only controls Linux permissions at this time, ACLs are not currently set (but could be set manually by the admin).
* File System (optional) - Select a file system in which the volume will exist. By default the file system set in ubiquity-server.conf is used.
197
+
* Usage: filesystem=(name)
198
+
* Fileset - This option selects the fileset that will be used for the volume. This can be used to create a volume from an existing fileset, or choose the fileset in which a lightweight volume will be created.
199
+
* Usage: fileset=modelingData
200
+
* Directory (lightweight volumes only): This option sets the name of the directory to be created for a lightweight volume. This can also be used to create a lighweight volume from an existing directory. The directory can be a relative path starting at the root of the path at which the fileset is linked in the file system namespace.
201
+
* Usage: directory=dir1
202
+
203
+
204
+
205
+
## Additional Considerations
206
+
### High-Availability
207
+
Ubiquity supports an Active-Passive model of availability. Currently, handling failures of the Ubiquity service must be done manually, although there are several possible options.
208
+
209
+
The Ubiquity service can be safely run on multiple nodes in an active-passive manner. Failover can then be manually achieved by switching the Ubiquity service hostname, or automatically through use of a HTTP load balancer such as HAProxy (which could be run in containers by K8s or Docker).
210
+
211
+
Moving forward, we will leverage Docker or K8s specific mechanisms to achieving high-availability by running the Ubiquity service in containers or a pod.
212
+
213
+
214
+
215
+
### Ubiquity Service Access to IBM Spectrum Scale CLI
123
216
Currently there are 2 different ways for Ubiquity to manage volumes in IBM Spectrum Scale.
124
217
* Direct access - In this setup, Ubiquity will directly call the IBM Spectrum Scale CLI (e.g., 'mm' commands). This means that Ubiquity must be deployed on a node that can directly call the CLI.
125
218
* ssh - In this setup, Ubiquity uses ssh to call the IBM Spectrum Scale CLI that is deployed on another node. This avoids the need to run Ubiquity on a node that is part of the IBM Spectrum Scale cluster. For example, this would also allow Ubiquity to run in a container.
126
219
127
220
## Roadmap
128
221
129
222
* Support OpenStack Manila storage back-end
130
-
* Add explicit instrucitons on use of certificates to secure communication between plugins and Ubiquity service
223
+
* Add explicit instructions on use of certificates to secure communication between plugins and Ubiquity service
131
224
* API for updating volumes
132
225
* Additional options to expore more features of Spectrum Scale, including use of the Spectrum Scale REST API.
133
226
* Containerization of Ubiquity for Docker and Kubernetes
134
-
* Kubernetes dynamic provisioning support
135
227
* Support for additional IBM storage systems
136
228
* Support for CloudFoundry
137
229
138
-
## Support
139
-
140
-
(TBD)
141
-
142
-
143
230
144
231
## Suggestions and Questions
145
-
For any questions, suggestions, or issues, please ...(TBD)
232
+
For any questions, suggestions, or issues, please use github.
0 commit comments