Skip to content

Commit

Permalink
Build pool fixes (#136)
Browse files Browse the repository at this point in the history
* changes to dockerfile

* correction to gitignore

Signed-off-by: Cam Parra <[email protected]>

* docker backup removed

Signed-off-by: Cam Parra <[email protected]>

* UPDATE on deps

* added comments
  • Loading branch information
mac-arrap authored and brentzundel committed Aug 31, 2018
1 parent dd36b63 commit b3f82a1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var/
.viminfo
.pytest_cache/
*.deb
devops/build-scripts/xenial/Pool_Party/Docker-r
Docker-r
Pipfile

# PyInstaller
Expand Down
37 changes: 10 additions & 27 deletions build_indy_pool
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,20 @@

export MAKE=/usr/bin/make

red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
printf "\n${red}BEGIN BUILDING:\t${green}sovtoken.deb\n"
sov_token=$(eval "SRC_DIR_NAME=sovtoken make -C devops/ package_in_docker" )
printf "${reset}SUCCESS:\t${green}sovtoken.deb built\n\n"

printf "${red}BEGIN BUILDING:\t${green}sovtokenfees.deb\n"
sov_token_fees=$(eval "SRC_DIR_NAME=sovtokenfees make -C devops/ package_in_docker" 2> /dev/null)
printf "${reset}SUCCESS:\t${green}sovtokenfees.deb built\n\n"
# This creates the docker containers that are used for packing
sov_token=$(eval "SRC_DIR_NAME=sovtoken make -C devops/ package_in_docker")
sov_token_fees=$(eval "SRC_DIR_NAME=sovtokenfees make -C devops/ package_in_docker")

# if the dockerfile is outdated this will update it with current version number
prep=$(./devops/build-scripts/xenial/Pool_Party/prep)


printf "${red}MOVING: ${green}sovtoken.deb to devops/build-scripts/xenial/Pool_Party/\n"
# the script calls for debians to be in the Pool_Party directory and this moves them there
mv devops/_build/sovtoken/*.deb devops/build-scripts/xenial/Pool_Party/.

printf "${red}MOVING: ${green}sovtoken.deb to devops/build-scripts/xenial/Pool_Party/\n"
mv devops/_build/sovtokenfees/*.deb devops/build-scripts/xenial/Pool_Party/.

printf "\n${reset}FILES HAVE BEEN MOVED SUCCESSFULLY\n"

# change to correct directory and begin building the pool
cd devops/build-scripts/xenial/Pool_Party/
printf "\n${red}BEGIN BUILDING:${green} payment ledger${reset}\nPlease Be Patient RocksDB and the Payment Ledger are being built\n\n"
docker build -t indy_pool . > /dev/null & PID=$!
printf "["
while kill -0 $PID 2> /dev/null; do
printf ""
sleep 1
done
printf "]\n\nBUILD COMPLETE\n\n"
printf "${red}RUNNING:\t${green} payment ledger\n"
docker run -itd -p 9701-9708:9701-9708 indy_pool > /dev/null
printf "${green}Success:\t${reset} payment ledger is now ready to use\n"
docker build -t indy_pool .

# build and expose container
docker run -itd -p 9701-9708:9701-9708 indy_pool
9 changes: 5 additions & 4 deletions devops/build-scripts/xenial/Pool_Party/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ ARG python3_indy_crypto_ver=0.4.1
ARG indy_crypto_ver=0.4.0
ARG indy_plenum_ver=1.6.50

ARG sovtoken_pkg_name=sovtoken_0.9.1_amd64.deb
ARG sovtokenfees_pkg_name=sovtokenfees_0.9.1_amd64.deb
# this should be left blank because the prep will supply the correct version number
ARG sovtoken_pkg_name=
ARG sovtokenfees_pkg_name=

COPY ${sovtoken_pkg_name} /root
COPY ${sovtokenfees_pkg_name} /root
Expand All @@ -66,8 +67,8 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88
RUN echo "deb https://repo.sovrin.org/deb xenial $indy_stream" >> /etc/apt/sources.list

RUN apt-get update -y && apt-get install -y \
indy-plenum \
indy-node \
indy-plenum=${indy_plenum_ver} \
indy-node=${indy_node_ver} \
indy-anoncreds=${indy_anoncreds_ver} \
python3-indy-crypto=${python3_indy_crypto_ver} \
libindy-crypto=${indy_crypto_ver} \
Expand Down
4 changes: 2 additions & 2 deletions devops/build-scripts/xenial/Pool_Party/prep
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ echo "Your current sovtoken debian package: $fpn \n"


echo "summoning warlocks to correct debian package names in the pool dockerfile\n"
sed -i -r "s~sovtoken_pkg_name=sovtoken_0.9.0_amd64.deb~sovtoken_pkg_name=$tpn~" "devops/build-scripts/xenial/Pool_Party/Dockerfile"
sed -i -r "s/sovtoken_pkg_name=/sovtoken_pkg_name=$tpn/" "devops/build-scripts/xenial/Pool_Party/Dockerfile"
sed -i -r "s/sovtokenfees_pkg_name=/sovtokenfees_pkg_name=$tpn/" "devops/build-scripts/xenial/Pool_Party/Dockerfile"

sed -i -r "s~sovtokenfees_pkg_name=sovtokenfees_0.9.0_amd64.deb~sovtokenfees_pkg_name=$fpn~" "devops/build-scripts/xenial/Pool_Party/Dockerfile"

0 comments on commit b3f82a1

Please sign in to comment.