Step 1: Launch a t2.medium instance (redhat 7.x)
Step 2: login and run the following commands
pushd /tmpsudo yum install wget -y # to get files we need
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # the epel repo for dockr-compose
sudo yum install -y epel-release-latest-7.noarch.rpmpopd
sudo yum update -y
sudo yum install vim-enhanced mlocate python-pip python-wheel python-wheel postgresql-devel wget tmux git -y
sudo sh -c "wget -qO- https://get.docker.com/ | sh" # installs docker
sudo groupadd -f docker && sudo usermod -aG docker $USER # creates docker userStep 3: Logout and login back. (due to setting a new user group for docker)
Step4: install docker-compose
sudo systemctl enable docker.servicesudo systemctl start docker.servicesudo pip install docker-compose # install docker compose now we have dockeralias dc='docker-compose'echo "alias dc='docker-compose'" > ~/.bashrcecho "alias dc='docker-compose'" > ~/.bash_profilestep 5: Create DART environment files to run using docker-compose.
cd ~mv dart/tools/vagrant .rm -rf dartcd vagrantgit clone https://github.com/RetailMeNotSandbox/dart.git # this source code will be referenced by d-composesudo pip install -r tools_requirements.txt # installs jinja so we can create d-compose filespython generate_deployment_files.py # generates files from templates, a set for each part (engine, web, ...)cd docker_filessed -i 's|/vagrant_data/docker_files|.|g' docker-compose.ymlsed -i 's|/vagrant_data|.|g' docker-compose.yml # removing prefixes since we will use the files in cur dirsed -i 's|/docker_files|.|g' docker-compose.ymlgit clone https://github.com/RetailMeNotSandbox/dart.git # the source codedocker-compose up -d --build web postgres elasticmq # launch dependent containers first so we can init dartStep 6: init DART database
STOP=1;
while [ $STOP -gt 0 ]; do
sh -c 'docker-compose logs web | tail -10'
docker-compose exec web curl -XPOST "http://127.0.0.1:5000/admin/create_all";
STOP=$?;
echo "Waiting for web worker to complete. Trying again in 15 seconds ..."
sleep 15;
done
step 7: Launch the remaining DART components.
docker-compose up -d --build engine trigger subscriptiondocker-compose ps # to verifyStep 8: Add no-op engine so we can run unit tests.
STOP=1;
while [ $STOP -gt 0 ]; do
docker-compose exec web python /tmp/src/python/dart/engine/no_op/add_engine.py;
STOP=$?;
sleep 1;
done
step 9: Run unit tests.
docker-compose exec web python -m unittest discover /tmp/src/python/dart/test/schema/ "test_*.py"docker-compose exec web python -m unittest discover /tmp/src/python/dart/test/graph "test_*.py"docker-compose exec web python -m unittest discover /tmp/src/python/dart/test/crud "test_*.py"_Step 10__: Misc.
my ip) then you can access this instance via browser
In [ ]: