Skip to content

Commit 88dbc7d

Browse files
committed
Updating devenv scripts. Fix for FAB-1567.
Make use of pysha3 version 1.0.0 which works on all platforms and also with Python 2.x and 3.x. Updating go version to 1.7 for ppc64le. Also installing other required dev packages (libltdl) and other pips required for behave tests (ecdsa and slugify). Change-Id: I8bc0185536021b589d246bdbd7be99b296c92263 Signed-off-by: Srirama Sharma <[email protected]>
1 parent ed7ed80 commit 88dbc7d

File tree

3 files changed

+24
-41
lines changed

3 files changed

+24
-41
lines changed

devenv/setupRHELonZ.sh

+7-14
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,8 @@ export PATH=$HOME/go/bin:$PATH
6565
rm -rf $HOME/go-linux-s390x-bootstrap
6666

6767
################
68-
#ROCKSDB BUILD
69-
70-
cd /tmp
71-
yum install -y gcc-c++ snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel
72-
git clone https://github.com/facebook/rocksdb.git
73-
cd rocksdb
74-
git checkout tags/v4.1
75-
echo There were some bugs in 4.1 for x/p, dev stream has the fix, living dangereously, fixing in place
76-
sed -i -e "s/-march=native/-march=zEC12/" build_tools/build_detect_platform
77-
sed -i -e "s/-momit-leaf-frame-pointer/-DDUMBDUMMY/" Makefile
78-
make shared_lib && INSTALL_PATH=/usr make install-shared && ldconfig
79-
cd /tmp
80-
rm -rf /tmp/rocksdb
68+
#Install Basic build essential packages
69+
yum install -y gcc-c++ python-devel device-mapper libtool-ltdl-devel libffi-devel openssl-devel
8170

8271
################
8372
# PIP
@@ -103,7 +92,11 @@ cd ../..
10392
GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install .
10493

10594
# updater-server, update-engine, and update-service-common dependencies (for running locally)
106-
pip install -I flask==0.10.1 python-dateutil==2.2 pytz==2014.3 pyyaml==3.10 couchdb==1.0 flask-cors==2.0.1 requests==2.4.3 pyOpenSSL==16.2.0 sha3==0.2.1
95+
pip install -I flask==0.10.1 python-dateutil==2.2 pytz==2014.3 pyyaml==3.10 couchdb==1.0 flask-cors==2.0.1 requests==2.4.3 pyOpenSSL==16.2.0 pysha3==1.0b1
96+
97+
#PIP packages required for some behave tests
98+
pip install urllib3 ndg-httpsclient pyasn1 ecdsa python-slugify grpcio-tools jinja2 b3j0f.aop
99+
107100
cat >> ~/.bashrc <<HEREDOC
108101
export PATH=$HOME/go/bin:$PATH
109102
export GOROOT=$HOME/go

devenv/setupUbuntuOnPPC64le.sh

+13-26
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fi
3333
# Install pre-requisite OS packages #
3434
#####################################
3535
apt-get update
36-
apt-get -y install software-properties-common curl git sudo wget
36+
apt-get -y install software-properties-common curl git sudo wget "build-essential" zlib1g-dev libbz2-dev
3737

3838
#####################################
3939
# Install and setup Docker services #
@@ -50,40 +50,27 @@ systemctl restart docker
5050
####################################
5151
# Golang binaries for ppc64le are publicly available from Unicamp and is recommended as it includes certain platform specific tuning/optimization.
5252
# Alternativley package part of Ubuntu disto repo can also be used.
53-
wget ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu/dists/trusty/at9.0/binary-ppc64el/advance-toolchain-at9.0-golang_9.0-3_ppc64el.deb
54-
dpkg -i advance-toolchain-at9.0-golang_9.0-3_ppc64el.deb
55-
rm -f advance-toolchain-at9.0-golang_9.0-3_ppc64el.deb
53+
wget ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu/dists/xenial/at10.0/binary-ppc64el/advance-toolchain-golang-at_10.0-2_ppc64el.deb
54+
dpkg -i advance-toolchain-golang-at_10.0-2_ppc64el.deb
55+
rm -f advance-toolchain-golang-at_10.0-2_ppc64el.deb
5656

5757
# Create links under /usr/bin using update-alternatives
58-
update-alternatives --install /usr/bin/go go /usr/local/go/bin/go 9
59-
update-alternatives --install /usr/bin/gofmt gofmt /usr/local/go/bin/gofmt 9
58+
update-alternatives --install /usr/bin/go go /usr/local/go/bin/go 10
59+
update-alternatives --install /usr/bin/gofmt gofmt /usr/local/go/bin/gofmt 10
6060

6161
# Set the GOROOT env variable
62-
export GOROOT="/usr/local/go"
63-
64-
####################################
65-
# Build and install RocksDB #
66-
####################################
67-
68-
apt-get -y install libsnappy-dev zlib1g-dev libbz2-dev "build-essential"
69-
70-
cd /tmp
71-
git clone https://github.com/facebook/rocksdb.git
72-
cd rocksdb
73-
git checkout tags/v4.1
74-
echo There were some bugs in 4.1. This was fixed in dev stream and newer releases like 4.5.1.
75-
sed -ibak 's/ifneq ($(MACHINE),ppc64)/ifeq (,$(findstring ppc64,$(MACHINE)))/g' Makefile
76-
PORTABLE=1 make shared_lib
77-
INSTALL_PATH=/usr/local make install-shared
78-
ldconfig
79-
cd - ; rm -rf /tmp/rocksdb
62+
export GOROOT="/opt/go"
63+
ln -s /usr/local/go $GOROOT
8064

8165
################################################
8266
# Install PIP tools, behave and docker-compose #
8367
################################################
8468

85-
apt-get -y install python-pip
69+
apt-get -y install python-pip libssl-dev libffi-dev libltdl-dev
8670
pip install --upgrade pip
8771
pip install behave nose docker-compose
8872

89-
pip install -I flask==0.10.1 python-dateutil==2.2 pytz==2014.3 pyyaml==3.10 couchdb==1.0 flask-cors==2.0.1 requests==2.4.3 grpcio==0.13.1 pyOpenSSL==16.2.0 sha3==0.2.1
73+
pip install -I flask==0.10.1 python-dateutil==2.2 pytz==2014.3 pyyaml==3.10 couchdb==1.0 flask-cors==2.0.1 requests==2.4.3 grpcio==1.0.4 pyOpenSSL==16.2.0 pysha3==1.0b1
74+
75+
#PIP packages required for some behave tests
76+
pip install urllib3 ndg-httpsclient pyasn1 ecdsa python-slugify grpcio-tools jinja2 b3j0f.aop six

docs/source/dev-setup/devenv.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ Prerequisites
5555

5656
pip install --upgrade pip
5757
pip install behave nose docker-compose
58-
pip install -I flask==0.10.1 python-dateutil==2.2 pytz==2014.3 pyyaml==3.10 couchdb==1.0 flask-cors==2.0.1 requests==2.4.3 pyOpenSSL==16.2.0 sha3==0.2.1
58+
pip install -I flask==0.10.1 python-dateutil==2.2 pytz==2014.3 pyyaml==3.10 couchdb==1.0 flask-cors==2.0.1 requests==2.4.3 pyOpenSSL==16.2.0 pysha3==1.0b1 grpcio==1.0.4
59+
60+
#PIP packages required for some behave tests
61+
pip install urllib3 ndg-httpsclient pyasn1 ecdsa python-slugify grpcio-tools jinja2 b3j0f.aop six
5962

6063
Steps
6164
~~~~~

0 commit comments

Comments
 (0)