This is an auto provisioning script to help set up the environment to run the linear road benchmark data generator.
- Install puppet.
$ sudo apt-get install puppet
- Install
puppet modules.
$ puppet module install puppetlabs-postgresql
$ puppet module install meltwater-cpan
- Install vagrant.
$ sudo apt-get install vagrant
- Install
vagrant plugin.
$ vagrant plugin install vagrant-digitalocean
$ vagrant plugin install vagrant-puppet-install
- After Git cloning the repository to you local. Go to
/vagrantfolder. - Create a RSA Key Pair.
$ ssh-keygen -t rsa
Enter file in which to save the key (/home/<username>/.ssh/id_rsa): do-office
..* The name of the file must match 'override.ssh.private_key_path' in Vagrantfile
- Add an enviornment variable to store access token.
$ sudo gedit ~/.bashrc
..* Add the following line
export DIGITALOCEAN_TOK=******************* (paste the access token obtained from Digital Ocean)
- Provisioning with
Digital Ocean. Modify theVagrantfilein/vagrantfolder if necessary.
config.vm.provider :digital_ocean do |provider, override|
override.ssh.private_key_path = './do-office'
override.vm.box = 'digital_ocean'
override.vm.box_url = 'https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box'
override.puppet_install.puppet_version = "3.7.2"
provider.token= ENV['DIGITALOCEAN_TOK']
# Configurable parameters depending which droplet you want to create
provider.image = "ubuntu-14-04-x64"
provider.region = "nyc1"
provider.size = "1gb"
end- Boot up the environment.
$ vagrant up
- Login to the VM with
$ vagrant ssh
. Then run
$ cd opt
$ ./run mitsim.config
- Modify the
mitsim.configin the local/vagrant/datafolder.
directoryforoutput=/opt/data
databasename=hellolrb
databaseusername=vagrant
databasepassword=hellopwd
numberofexpressways=0.5
MITSIM output will be in the folder designated as directoryforoutput in mistsim.config.
Three output file: cardatapoints.out, historical-tolls.out, maxCarid.out