Skip to content

Commit d9e1ac8

Browse files
committedDec 29, 2017
[FAB-7126] Changes Vagrant mount point to hyperledger
This changes the main Vagrant mount point to hyperledger to provide access to all present hyperledger repositories, including fabric-samples. This will give access to new repos as they are added without requiring a modification of the Vagrantfile every time. Patch-set hyperledger#1: adds fabric-samples to the list of mounted volumes if it exists Patch-set hyperledger#2: fixes commit message Patch-set hyperledger#3: changes strategy, mounting the parent directory to be future proof Patch-set hyperledger#4: removed unrelated changes committed by error Change-Id: If126bd9d6d8806f149a0e6bacb1d8d34875f7ba4 Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
1 parent c52e9df commit d9e1ac8

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed
 

‎devenv/Vagrantfile

+4-11
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ set -x
2525
2626
echo "127.0.0.1 couchdb" | tee -a /etc/hosts
2727
28-
cd #{SRCMOUNT}/devenv
28+
cd #{SRCMOUNT}/fabric/devenv
2929
./setup.sh
3030
3131
SCRIPT
@@ -39,16 +39,9 @@ Vagrant.configure('2') do |config|
3939
config.vm.network :forwarded_port, guest: 7053, host: 7053, id: "peer_event", host_ip: "localhost", auto_correct: true # fabric peer event service
4040
config.vm.network :forwarded_port, guest: 7054, host: 7054, id: "ca", host_ip: "localhost", auto_correct: true # fabric-ca service
4141
config.vm.network :forwarded_port, guest: 5984, host: 15984, id: "couchdb", host_ip: "localhost", auto_correct: true # CouchDB service
42-
config.vm.synced_folder "..", "#{SRCMOUNT}"
43-
config.vm.synced_folder "..", "/opt/gopath/src/github.com/hyperledger/fabric"
44-
config.vm.synced_folder ENV.fetch('LOCALDEVDIR', ".."), "#{LOCALDEV}"
45-
if File.exist?("../../fabric-ca")
46-
config.vm.synced_folder "../../fabric-ca", "/opt/gopath/src/github.com/hyperledger/fabric-ca"
47-
end
48-
if File.exist?("../../fabric-test")
49-
config.vm.synced_folder "../../fabric-test", "/opt/gopath/src/github.com/hyperledger/fabric-test"
50-
end
51-
42+
config.vm.synced_folder "../..", "#{SRCMOUNT}"
43+
config.vm.synced_folder "../..", "/opt/gopath/src/github.com/hyperledger"
44+
config.vm.synced_folder ENV.fetch('LOCALDEVDIR', "../.."), "#{LOCALDEV}"
5245
config.vm.provider :virtualbox do |vb|
5346
vb.name = "hyperledger"
5447
vb.customize ['modifyvm', :id, '--memory', '4096']

‎devenv/setup.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
set -e
1010
set -x
1111

12-
DEVENV_REVISION=`(cd /hyperledger/devenv; git rev-parse --short HEAD)`
12+
DEVENV_REVISION=`(cd /hyperledger/fabric/devenv; git rev-parse --short HEAD)`
1313

1414
# Install WARNING before we start provisioning so that it
1515
# will remain active. We will remove the warning after
@@ -81,12 +81,12 @@ curl -sL $GO_URL | (cd $GOROOT && tar --strip-components 1 -xz)
8181
# ----------------------------------------------------------------
8282
# Install nvm and Node.js
8383
# ----------------------------------------------------------------
84-
runuser -l ubuntu -c '/hyperledger/devenv/install_nvm.sh'
84+
runuser -l ubuntu -c '/hyperledger/fabric/devenv/install_nvm.sh'
8585

8686
# ----------------------------------------------------------------
8787
# Install Behave
8888
# ----------------------------------------------------------------
89-
/hyperledger/scripts/install_behave.sh
89+
/hyperledger/fabric/scripts/install_behave.sh
9090

9191
# ----------------------------------------------------------------
9292
# Install Java
@@ -116,12 +116,12 @@ make clean gotools
116116
sudo chown -R ubuntu:ubuntu $GOPATH
117117

118118
# Update limits.conf to increase nofiles for LevelDB and network connections
119-
sudo cp /hyperledger/devenv/limits.conf /etc/security/limits.conf
119+
sudo cp /hyperledger/fabric/devenv/limits.conf /etc/security/limits.conf
120120

121121
# Configure vagrant specific environment
122122
cat <<EOF >/etc/profile.d/vagrant-devenv.sh
123123
# Expose the devenv/tools in the $PATH
124-
export PATH=\$PATH:/hyperledger/devenv/tools:/hyperledger/build/bin
124+
export PATH=\$PATH:/hyperledger/fabric/devenv/tools:/hyperledger/fabric/build/bin
125125
export VAGRANT=1
126126
export CGO_CFLAGS=" "
127127
EOF

0 commit comments

Comments
 (0)
Please sign in to comment.