Skip to content

Commit 8f3d376

Browse files
committed
Support for showing multiple cluster information
Signed-off-by: Luis Pabón <[email protected]>
1 parent 8d3075c commit 8f3d376

File tree

9 files changed

+620
-5
lines changed

9 files changed

+620
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/sh
2+
#
3+
#
4+
# Copyright © 2020 Portworx
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
function usage() {
20+
echo "
21+
Create a StorageCluster for the Portworx Operator
22+
23+
Usage:
24+
pxc operator cluster create [flags]
25+
26+
Flags:
27+
-h, --help help for create
28+
--name Name of cluster
29+
--csi Use CSI
30+
"
31+
exit 1
32+
}
33+
34+
parsed=$(getopt -o h -n "pxc operator cluster create" --long name:,help,csi -- "$@" )
35+
if [ $? -ne 0 ] ; then
36+
usage
37+
fi
38+
39+
eval set -- "$parsed"
40+
41+
NAME=""
42+
CSI=false
43+
44+
while true; do
45+
case "$1" in
46+
--csi) CSI=true; shift ;;
47+
--name) NAME="$2"; shift 2 ;;
48+
-h | --help) usage;;
49+
--) shift; break ;;
50+
*) usage; break ;;
51+
esac
52+
done
53+
54+
if [ "$NAME" = "" ] ; then
55+
echo "Must provide a name"
56+
exit 1
57+
fi
58+
59+
NAME=$(echo $NAME | sed "s# #-#g")
60+
61+
curl -sL https://install.portworx.com/?operator=true\&csi=${CSI}\&c=${NAME}
62+
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
#
3+
#
4+
# Copyright © 2020 Portworx
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
function usage() {
20+
echo "
21+
Create a Portworx Operator manifest
22+
23+
Usage:
24+
pxc operator install [flags]
25+
26+
Flags:
27+
-h, --help help for create
28+
"
29+
exit 1
30+
}
31+
32+
parsed=$(getopt -o h -n "pxc operator install" --long help -- "$@" )
33+
if [ $? -ne 0 ] ; then
34+
usage
35+
fi
36+
37+
eval set -- "$parsed"
38+
39+
while true; do
40+
case "$1" in
41+
-h | --help) usage;;
42+
--) shift; break ;;
43+
*) usage; break ;;
44+
esac
45+
done
46+
47+
curl -sL https://install.portworx.com/?comp=pxoperator
48+

0 commit comments

Comments
 (0)