Skip to content

Commit

Permalink
[FAB-13818] add limits and cleanup Vagrantfile
Browse files Browse the repository at this point in the history
Change-Id: Ie7cc3fbce27ea2af1f4187c60ead6c78bdc2e314
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
  • Loading branch information
sykesm committed Jan 22, 2019
1 parent d976638 commit abf12e8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Vagrant.configure('2') do |config|

config.vm.provider :virtualbox do |vb|
vb.name = "hyperledger"
vb.customize ['modifyvm', :id, '--memory', '4096']
vb.customize ['modifyvm', :id, '--uartmode1', 'disconnected']
vb.cpus = 2
vb.memory = 4096
end

config.vm.provision :shell, name: "essentials", path: "essentials.sh"
config.vm.provision :shell, name: "srcdir", path: "srcdir.sh"
config.vm.provision :shell, name: "docker", path: "docker.sh"
config.vm.provision :shell, name: "golang", path: "golang.sh"
config.vm.provision :shell, name: "limits", path: "limits.sh"
config.vm.provision :shell, name: "softhsm", path: "softhsm.sh"
config.vm.provision :shell, name: "user", privileged: false, path: "user.sh"
end
Expand Down
2 changes: 1 addition & 1 deletion vagrant/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add-apt-repository \
# ----------------------------------------------------------------
# Install docker
# ----------------------------------------------------------------
apt-get update -qq
apt-get -qq update
apt-get install -y docker-ce

# ----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions vagrant/essentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# SPDX-License-Identifier: Apache-2.0

# ----------------------------------------------------------------
# Update the entire system to the latest releases
# Update the entire system to the latest versions
# ----------------------------------------------------------------
apt-get update
apt-get -qq update && apt-get upgrade -y

# ----------------------------------------------------------------
# Install some basic utilities
Expand Down
16 changes: 16 additions & 0 deletions vagrant/limits.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash -eu
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0

# ----------------------------------------------------------------
# set custom limits
# ----------------------------------------------------------------

cat <<EOF >/etc/security/limits.d/99-hyperledger.conf
# custom limits for hyperledger development
* soft nofile 10000
* hard nofile 16384
EOF

0 comments on commit abf12e8

Please sign in to comment.