Skip to content
This repository was archived by the owner on Jul 7, 2020. It is now read-only.

Commit ef8d151

Browse files
committed
Add script to deploy into a single node minikube instance
The script starts a minikube instance with a special minikube.iso that includes heketi prerequirements, that are missing in the stock minikube.iso: dm_* modules in the kernel, glusterfs and the xfs tools. After that it creates a block device image under /mnt/vda1/heketi-bricks.img that is connected to /dev/loop1. Finally gk-deploy is started in the single-node mode.
1 parent 2a2a68c commit ef8d151

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

deploy/gk-deploy-minikube

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
# Copyright (c) 2018 Red Hat, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
# implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
SCRIPT_DIR="$(cd "$(dirname "${0}")" && pwd)"
18+
TOPOLOGY='topology-minikube.json'
19+
20+
set -ex
21+
22+
minikube start --vm-driver kvm2 --network-plugin cni --iso-url https://github.com/ansiwen/minikube/releases/download/v0.27.0-gluster/minikube-gluster.iso
23+
24+
minikube ssh "\
25+
sudo truncate -s 10G /mnt/vda1/heketi-bricks.img \
26+
&& sudo losetup /dev/loop1 /mnt/vda1/heketi-bricks.img \
27+
&& sudo pvcreate /dev/loop1 \
28+
"
29+
30+
$SCRIPT_DIR/gk-deploy --yes --single-node --cli kubectl --deploy-gluster $SCRIPT_DIR/$TOPOLOGY

deploy/topology-minikube.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"clusters": [
3+
{
4+
"nodes": [
5+
{
6+
"node": {
7+
"hostnames": {
8+
"manage": [
9+
"minikube"
10+
],
11+
"storage": [
12+
"172.17.0.1"
13+
]
14+
},
15+
"zone": 1
16+
},
17+
"devices": [
18+
"/dev/loop1"
19+
]
20+
}
21+
]
22+
}
23+
]
24+
}

0 commit comments

Comments
 (0)