Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit e7b386e

Browse files
authored
Merge pull request #150 from feiskyer/fix-install
Fix hypernetes install and upgrade to v1.3.1
2 parents ddc2cf3 + 7206cdd commit e7b386e

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

hack/hypernetes/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Note: The script should be run as `root`.
1111
1. Setup environment variables:
1212

1313
```sh
14-
export HOSTNAME="k8s"
14+
export HOSTNAME=$(hostname)
1515
export IF_NAME="eth0"
1616
export IF_IP=""
1717
export GOPATH="/gopath"
@@ -47,6 +47,6 @@ yum -y update
4747

4848
### Install failed due to slow network
4949

50-
For slow networks, the installation may fail with timeout. When this happens, just comment out successed steps from `hack/local-up-hypernetes.sh` and re-run the script to continue the installation.
50+
For slow networks, the installation may fail with timeout. When this happens, just run the `hack/local-up-hypernetes.sh` script again to continue the installation.
5151

5252
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/hack/hypernetes/README.md?pixel)]()

hack/hypernetes/ceph.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ function kube::util::do_setup_ceph() {
4242
cd /root/ceph-cluster
4343
ceph-deploy new $HOSTNAME
4444
echo "osd pool default size = 1" >> ceph.conf
45+
echo "rbd default features = 3" >> ceph.conf
4546

4647
ceph-deploy install $HOSTNAME
4748

@@ -66,7 +67,7 @@ function kube::util::setup_cinder() {
6667

6768
## create pool for cinder
6869
ceph osd pool create cinder 256 256
69-
rbd feature disable cinder exclusive-lock object-map fast-diff deep-flatten
70+
#rbd feature disable cinder exclusive-lock object-map fast-diff deep-flatten
7071
ceph auth get-or-create client.cinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=cinder'
7172

7273
## auth for cinder
@@ -93,7 +94,8 @@ EOF
9394
sed -i 's/^enabled_backends.*$/enabled_backends = ceph/g' /etc/cinder/cinder.conf
9495

9596
systemctl | awk '/cinder/{print $1}' | while read line; do
96-
systemctl restart $line
97+
echo "Restarting $line ..."
98+
systemctl restart $line
9799
done
98100
}
99101

hack/hypernetes/hypernetes.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ set -o pipefail
2121
function kube::util::download_hypernetes() {
2222
echo "Start $FUNCNAME"
2323
yum -y install kubernetes etcd
24-
curl -p -SL https://github.com/hyperhq/hypernetes/releases/download/v1.2.0/kubernetes-server-linux-amd64.tar.gz -o /tmp/kubernetes-server-linux-amd64.tar.gz
25-
tar zxvf /tmp/kubernetes-server-linux-amd64.tar.gz -C /usr/bin/
26-
rm -f /tmp/kubernetes-server-linux-amd64.tar.gz
24+
curl -p -SL https://github.com/hyperhq/hypernetes/releases/download/v1.3.1/kubernetes-server-linux-amd64.tar.gz -o /tmp/kubernetes-server-linux-amd64.tar.gz
25+
cd /tmp
26+
tar zxvf /tmp/kubernetes-server-linux-amd64.tar.gz
27+
/bin/cp -f /tmp/kubernetes/server/bin/* /usr/bin/
28+
rm -rf /tmp/kubernetes-server-linux-amd64.tar.gz /tmp/kubernetes
2729
}
2830

2931
function kube::util::build_hypernetes() {

hack/hypernetes/openstack.sh

100644100755
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function kube::util::setup_openstack() {
2323

2424
# make sure yum is not running
2525
kube::util::ensure_yum_ready
26-
yum install -y centos-release-openstack-mitaka
26+
yum install -y centos-release-openstack-mitaka epel-release
2727
yum update -y
2828
yum install -y openstack-packstack
2929

@@ -43,6 +43,7 @@ function kube::util::setup_openstack() {
4343
sed -i 's/CONFIG_AODH_INSTALL=y/CONFIG_AODH_INSTALL=n/g' /root/packstack_answer_file.txt
4444
sed -i 's/CONFIG_GNOCCHI_INSTALL=y/CONFIG_GNOCCHI_INSTALL=n/g' /root/packstack_answer_file.txt
4545
sed -i 's/CONFIG_GLANCE_INSTALL=y/CONFIG_GLANCE_INSTALL=n/g' /root/packstack_answer_file.txt
46+
sed -i 's/CONFIG_USE_EPEL=n/CONFIG_USE_EPEL=y/g' /root/packstack_answer_file.txt
4647

4748
# Install OpenStack
4849
packstack --answer-file=/root/packstack_answer_file.txt
@@ -64,5 +65,7 @@ function kube::util::setup_openstack() {
6465
function kube::util::clean_neutron_resource() {
6566
local tenant_name=$1
6667
local tenant_id=`keystone tenant-list 2>/dev/null | grep ${tenant_name} | awk '{print $2}'`
67-
neutron purge $tenant_id
68+
if [ "${tenant_id}" != "" ]; then
69+
neutron purge ${tenant_id}
70+
fi
6871
}

hack/hypernetes/util.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ EOF
7878
function kube::util::install_golang() {
7979
echo "Start $FUNCNAME"
8080
yum -y install git
81-
curl -L https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz | tar -C /usr/local -zxf -
81+
curl -L https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz | tar -C /usr/local -zxf -
8282
echo 'export GOPATH=/gopath/' >> /root/.bashrc
8383
echo 'export PATH=$PATH:$GOPATH/bin:/usr/local/bin:/usr/local/go/bin/' >> /root/.bashrc
8484
go get github.com/tools/godep

0 commit comments

Comments
 (0)