Skip to content

Commit a022337

Browse files
committed
initial
0 parents  commit a022337

File tree

155 files changed

+13810
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+13810
-0
lines changed

LICENSE

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+
1. Definitions.
8+
9+
"License" shall mean the terms and conditions for use, reproduction, and
10+
distribution as defined by Sections 1 through 9 of this document.
11+
12+
"Licensor" shall mean the copyright owner or entity authorized by the copyright
13+
owner that is granting the License.
14+
15+
"Legal Entity" shall mean the union of the acting entity and all other entities
16+
that control, are controlled by, or are under common control with that entity.
17+
For the purposes of this definition, "control" means (i) the power, direct or
18+
indirect, to cause the direction or management of such entity, whether by
19+
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20+
outstanding shares, or (iii) beneficial ownership of such entity.
21+
22+
"You" (or "Your") shall mean an individual or Legal Entity exercising
23+
permissions granted by this License.
24+
25+
"Source" form shall mean the preferred form for making modifications, including
26+
but not limited to software source code, documentation source, and
27+
configuration files.
28+
29+
"Object" form shall mean any form resulting from mechanical transformation or
30+
translation of a Source form, including but not limited to compiled object
31+
code, generated documentation, and conversions to other media types.
32+
33+
"Work" shall mean the work of authorship, whether in Source or Object form,
34+
made available under the License, as indicated by a copyright notice that is
35+
included in or attached to the work (an example is provided in the Appendix
36+
below).
37+
38+
"Derivative Works" shall mean any work, whether in Source or Object form, that
39+
is based on (or derived from) the Work and for which the editorial revisions,
40+
annotations, elaborations, or other modifications represent, as a whole, an
41+
original work of authorship. For the purposes of this License, Derivative Works
42+
shall not include works that remain separable from, or merely link (or bind by
43+
name) to the interfaces of, the Work and Derivative Works thereof.
44+
45+
"Contribution" shall mean any work of authorship, including the original
46+
version of the Work and any modifications or additions to that Work or
47+
Derivative Works thereof, that is intentionally submitted to Licensor for
48+
inclusion in the Work by the copyright owner or by an individual or Legal
49+
Entity authorized to submit on behalf of the copyright owner. For the purposes
50+
of this definition, "submitted" means any form of electronic, verbal, or
51+
written communication sent to the Licensor or its representatives, including
52+
but not limited to communication on electronic mailing lists, source code
53+
control systems, and issue tracking systems that are managed by, or on behalf
54+
of, the Licensor for the purpose of discussing and improving the Work, but
55+
excluding communication that is conspicuously marked or otherwise designated in
56+
writing by the copyright owner as "Not a Contribution."
57+
58+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
59+
of whom a Contribution has been received by Licensor and subsequently
60+
incorporated within the Work.
61+
62+
2. Grant of Copyright License.
63+
64+
Subject to the terms and conditions of this License, each Contributor hereby
65+
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
66+
irrevocable copyright license to reproduce, prepare Derivative Works of,
67+
publicly display, publicly perform, sublicense, and distribute the Work and
68+
such Derivative Works in Source or Object form.
69+
70+
3. Grant of Patent License.
71+
72+
Subject to the terms and conditions of this License, each Contributor hereby
73+
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
74+
irrevocable (except as stated in this section) patent license to make, have
75+
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
76+
such license applies only to those patent claims licensable by such Contributor
77+
that are necessarily infringed by their Contribution(s) alone or by combination
78+
of their Contribution(s) with the Work to which such Contribution(s) was
79+
submitted. If You institute patent litigation against any entity (including a
80+
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
81+
Contribution incorporated within the Work constitutes direct or contributory
82+
patent infringement, then any patent licenses granted to You under this License
83+
for that Work shall terminate as of the date such litigation is filed.
84+
85+
4. Redistribution.
86+
87+
You may reproduce and distribute copies of the Work or Derivative Works thereof
88+
in any medium, with or without modifications, and in Source or Object form,
89+
provided that You meet the following conditions:
90+
91+
You must give any other recipients of the Work or Derivative Works a copy of
92+
this License; and
93+
You must cause any modified files to carry prominent notices stating that You
94+
changed the files; and
95+
You must retain, in the Source form of any Derivative Works that You
96+
distribute, all copyright, patent, trademark, and attribution notices from the
97+
Source form of the Work, excluding those notices that do not pertain to any
98+
part of the Derivative Works; and
99+
If the Work includes a "NOTICE" text file as part of its distribution, then any
100+
Derivative Works that You distribute must include a readable copy of the
101+
attribution notices contained within such NOTICE file, excluding those notices
102+
that do not pertain to any part of the Derivative Works, in at least one of the
103+
following places: within a NOTICE text file distributed as part of the
104+
Derivative Works; within the Source form or documentation, if provided along
105+
with the Derivative Works; or, within a display generated by the Derivative
106+
Works, if and wherever such third-party notices normally appear. The contents
107+
of the NOTICE file are for informational purposes only and do not modify the
108+
License. You may add Your own attribution notices within Derivative Works that
109+
You distribute, alongside or as an addendum to the NOTICE text from the Work,
110+
provided that such additional attribution notices cannot be construed as
111+
modifying the License.
112+
You may add Your own copyright statement to Your modifications and may provide
113+
additional or different license terms and conditions for use, reproduction, or
114+
distribution of Your modifications, or for any such Derivative Works as a
115+
whole, provided Your use, reproduction, and distribution of the Work otherwise
116+
complies with the conditions stated in this License.
117+
118+
5. Submission of Contributions.
119+
120+
Unless You explicitly state otherwise, any Contribution intentionally submitted
121+
for inclusion in the Work by You to the Licensor shall be under the terms and
122+
conditions of this License, without any additional terms or conditions.
123+
Notwithstanding the above, nothing herein shall supersede or modify the terms
124+
of any separate license agreement you may have executed with Licensor regarding
125+
such Contributions.
126+
127+
6. Trademarks.
128+
129+
This License does not grant permission to use the trade names, trademarks,
130+
service marks, or product names of the Licensor, except as required for
131+
reasonable and customary use in describing the origin of the Work and
132+
reproducing the content of the NOTICE file.
133+
134+
7. Disclaimer of Warranty.
135+
136+
Unless required by applicable law or agreed to in writing, Licensor provides
137+
the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
138+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
139+
including, without limitation, any warranties or conditions of TITLE,
140+
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
141+
solely responsible for determining the appropriateness of using or
142+
redistributing the Work and assume any risks associated with Your exercise of
143+
permissions under this License.
144+
145+
8. Limitation of Liability.
146+
147+
In no event and under no legal theory, whether in tort (including negligence),
148+
contract, or otherwise, unless required by applicable law (such as deliberate
149+
and grossly negligent acts) or agreed to in writing, shall any Contributor be
150+
liable to You for damages, including any direct, indirect, special, incidental,
151+
or consequential damages of any character arising as a result of this License
152+
or out of the use or inability to use the Work (including but not limited to
153+
damages for loss of goodwill, work stoppage, computer failure or malfunction,
154+
or any and all other commercial damages or losses), even if such Contributor
155+
has been advised of the possibility of such damages.
156+
157+
9. Accepting Warranty or Additional Liability.
158+
159+
While redistributing the Work or Derivative Works thereof, You may choose to
160+
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
161+
other liability obligations and/or rights consistent with this License.
162+
However, in accepting such obligations, You may act only on Your own behalf and
163+
on Your sole responsibility, not on behalf of any other Contributor, and only
164+
if You agree to indemnify, defend, and hold each Contributor harmless for any
165+
liability incurred by, or claims asserted against, such Contributor by reason
166+
of your accepting any such warranty or additional liability.
167+
168+
END OF TERMS AND CONDITIONS
169+
170+
APPENDIX: How to apply the Apache License to your work
171+
172+
To apply the Apache License to your work, attach the following boilerplate
173+
notice, with the fields enclosed by brackets "[]" replaced with your own
174+
identifying information. (Don't include the brackets!) The text should be
175+
enclosed in the appropriate comment syntax for the file format. We also
176+
recommend that a file or class name and description of purpose be included on
177+
the same "printed page" as the copyright notice for easier identification
178+
within third-party archives.
179+
180+
Copyright [yyyy] [name of copyright owner]
181+
182+
Licensed under the Apache License, Version 2.0 (the "License");
183+
you may not use this file except in compliance with the License.
184+
You may obtain a copy of the License at
185+
186+
http://www.apache.org/licenses/LICENSE-2.0
187+
188+
Unless required by applicable law or agreed to in writing, software
189+
distributed under the License is distributed on an "AS IS" BASIS,
190+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
191+
See the License for the specific language governing permissions and
192+
limitations under the License.

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## HPE Docker Volume Plugin for HPE 3PAR StoreServ
2+
3+
HPE Docker Volume Plugin is an open source project that provides persistent storage and features for your containerized applications using HPE 3PAR StoreServ Storage arrays.
4+
5+
The HPE Docker Volume Plugin supports popular container platforms like Docker, Kubernetes, OpenShift and soon SuSE CaaS/CAP (coming in v3.0)
6+
7+
## HPE Docker Volume Plugin Overview
8+
9+
### **Standalone Docker instance**
10+
11+
Here is an example of the HPE Docker Volume plugin being used in a standalone Docker instance:
12+
13+
![HPE Docker Volume Plugin](/docs/img/3PAR_docker_design_diagram_75.png)
14+
15+
---
16+
### **Kubernetes/OpenShift environment**
17+
18+
Here is an example of the HPE Docker Volume plugin being used in an OpenShift environment:
19+
20+
![HPE Docker Volume Plugin with OpenShift](/docs/img/3PAR_k8_design_diagram_75.png)
21+
22+
## Install and Quick Start instructions
23+
24+
* Review the [System Requirements](/docs/system-reqs.md) before installing the plugin
25+
* Check out the [Quick Start Guide](/docs/quick_start_guide.md) for deploying the **HPE Docker Volume Plugin** in [Docker](/docs/quick_start_guide.md#docker) or in [Kubernetes/OpenShift](/docs/quick_start_guide.md#k8) environments
26+
27+
28+
## Supported Features
29+
30+
* Fibre Channel & iSCSI support for 3PAR
31+
* Secure/Unsecure etcd cluster for fault tolerance
32+
* Advanced volume features
33+
* thin
34+
* dedup
35+
* full
36+
* compression
37+
* snapshots
38+
* clones
39+
* QoS
40+
* snapshot mount
41+
* mount_conflict_delay
42+
* concurrent volume access
43+
44+
## Usage
45+
46+
See the [usage guide](/docs/usage.md) for details on the supported operations and usage of the plugin.
47+
48+
## Troubleshooting
49+
50+
Troubleshooting issues with the plugin can be performed using these [tips](/docs/troubleshooting.md)

ansible_3par_docker_plugin/README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# ansible_3par_docker_plugin
2+
3+
These are Ansible playbooks to automate the install of the HPE 3PAR Docker Volume Plug-in for Docker for use within Kubernetes/OpenShift environments.
4+
5+
If you are not using Kubernetes or OpenShift, we recommend you take a look at the [Quick Start guide](/docs/quick_start_guide.md) for using the HPE 3PAR Docker Volume Plug-in in a standalone Docker environment.
6+
7+
### Getting Started
8+
9+
These playbooks perform the following tasks on the Master/Worker nodes as defined in the Ansible [hosts](/ansible_3par_docker_plugin/hosts) file.
10+
* Configure the Docker Services for the HPE 3PAR Docker Volume Plug-in
11+
* Deploys a 3-node Highly Available etcd cluster
12+
* Deploys the config files (iSCSI or FC) to support your environment
13+
* Installs the HPE 3PAR Docker Volume Plug-in (Containerized version) for Kubernetes/OpenShift
14+
* Deploys the HPE FlexVolume Drivers
15+
16+
### Prerequisites:
17+
18+
- Install Ansible per [Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
19+
- Login to 3PAR to create known_hosts file
20+
> **Note:** Entries for the Master and Worker nodes should already exist within the /<user>/.ssh/known_hosts file from the OpenShift installation. If not, you will need to log into each of the Master and Worker nodes as well to prevent connection errors from Ansible.
21+
22+
- modify files/hpe.conf ([iSCSI](/ansible_3par_docker_plugin/files/iSCSI_hpe.conf) or [FC](/ansible_3par_docker_plugin/files/FC_hpe.conf)) based on your HPE 3PAR Storage array configuration. An example can be found here: [sample_hpe.conf](/ansible_3par_docker_plugin/files/sample_hpe.conf)
23+
24+
- Modify [hosts](/ansible_3par_docker_plugin/hosts) file to define your Master/Worker nodes as well as where you want to deploy your etcd cluster
25+
26+
### Usage
27+
28+
Once the prerequisites are complete, run the following command:
29+
30+
```
31+
$ ansible-playbook -i hosts install_hpe_3par_volume_driver.yml
32+
```
33+
34+
Once complete you will be ready to start using the HPE 3PAR Docker Volume Plug-in within Kubernetes/OpenShift.
35+
36+
Please refer to the Kubernetes/OpenShift section in the [Usage Guide](/docs/usage.md#k8_usage) on how to create and deploy some sample SCs, PVCs, and Pods with persistent volumes using the HPE 3PAR Docker Volume Plug-in.
37+
38+
39+
<br><br>
40+
41+
42+
### Known Issues
43+
44+
Ansible on some Linux Distros (i.e. CentOS and Ubuntu) may throw an error about missing the `docker` module.
45+
46+
```
47+
TASK [run etcd container] ******************************************************************************************************************************************
48+
fatal: [192.168.1.35]: FAILED! => {"changed": false, "msg": "Failed to import docker-py - No module named docker. Try `pip install docker-py`"}
49+
```
50+
51+
Run:
52+
53+
```
54+
pip install docker
55+
```
56+
57+
-----------------------------------------------------------------------------------
58+
59+
On Ansible 2.6 and later, per https://github.com/ansible/ansible/issues/42162, `docker-py` has been deprecated and when running the Ansible playbook, you may see the following error:
60+
61+
```
62+
docker_container: create_host_config() got an unexpected keyword argument 'init'
63+
```
64+
65+
`docker-py` is no longer supported and has been deprecated in favor of the `docker` module.
66+
67+
If `docker-py` is installed, run:
68+
69+
```
70+
pip uninstall docker-py
71+
```
72+
73+
Run:
74+
75+
```
76+
pip install docker
77+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[DEFAULT]
2+
ssh_hosts_key_file = /root/.ssh/known_hosts
3+
4+
#change to match Master host IP where etcd is running
5+
host_etcd_ip_address = <ip-address>
6+
7+
#Modify to match the port configured in etcd (2379 or 23790)
8+
host_etcd_port_number = 23790
9+
logging = DEBUG
10+
hpe3par_debug = True
11+
suppress_requests_ssl_warnings = True
12+
hpedockerplugin_driver = hpedockerplugin.hpe.hpe_3par_fc.HPE3PARFCDriver
13+
14+
#Set the HPE 3PAR IP address
15+
hpe3par_api_url = https://<3PAR IP address>:8080/api/v1
16+
17+
#Set the HPE 3PAR username/password
18+
hpe3par_username = <3par WSAPI username>
19+
hpe3par_password = <3par WSAPI password>
20+
21+
#Set the HPE 3PAR IP address
22+
san_ip = <SAN IP>
23+
24+
#Set the HPE 3PAR username/password
25+
san_login = <SAN username>
26+
san_password = <SAN password>
27+
28+
#Set the default CPG to be used for volume creation
29+
hpe3par_cpg = <CPG name used for volume creation>
30+
# hpe3par_snapcpg = <CPG name used for snapshot creation>
31+
# hpe3par_snapcpg is optional. If not provided, it defaults to hpe3par_cpg value
32+
33+
use_multipath = True
34+
enforce_multipath = True
44.9 MB
Binary file not shown.
6.26 MB
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"dockerVolumePluginSocketPath": "/run/docker/plugins/hpe.sock",
3+
"logDebug": true,
4+
"supportsCapabilities": true,
5+
"stripK8sFromOptions": true,
6+
"createVolumes": true,
7+
"listOfStorageResourceOptions": [ "size" ]
8+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
#TODO dump the EULA using more or less
4+
5+
while true; do
6+
read -p "Proceed with installation of dory/doryd binaries ? " yn
7+
case $yn in
8+
[Yy]* ) break;;
9+
[Nn]* ) exit;;
10+
* ) echo "Please answer yes or no.";;
11+
esac
12+
done
13+
14+
installDir=/usr/libexec/kubernetes/kubelet-plugins/volume/exec/hpe.com~hpe/
15+
16+
if [ -d ${installDir} ]
17+
then
18+
echo "Upgrading flexvolumedriver."
19+
else
20+
echo "Installing flexvolumedriver."
21+
mkdir -p $installDir
22+
fi
23+
24+
mv ./* "${installDir}"
25+
26+
rm ${installDir}/install
27+
28+
exit 0
29+

0 commit comments

Comments
 (0)