From 82c388c787f9348494a3ce87c85dbebb9bce1b34 Mon Sep 17 00:00:00 2001 From: BJ Dierkes Date: Fri, 2 Feb 2018 16:44:04 -0600 Subject: [PATCH] Update README --- Makefile | 7 +++++-- README.md | 11 +++++++++-- Vagrantfile | 6 +++--- scripts/vagrant/bootstrap.ps1 | 36 +++++++++++++++++------------------ 4 files changed, 35 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index d7d45886..97243a07 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,10 @@ init: pip install --upgrade -r requirements-dev.txt test: - python -m pytest -v tests/ + python -m pytest -v tests/ test-coverage: - python -m pytest -v --cov=cement --cov-report=term --cov-report=html:coverage-report tests/ + python -m pytest -v --cov=cement --cov-report=term --cov-report=html:coverage-report tests/ comply: flake8 cement/ tests/ @@ -24,3 +24,6 @@ clean: find . -name '*.py[co]' -delete rm -rf doc/build +dev: + docker-compose up -d + docker-compose exec cement /bin/ash diff --git a/README.md b/README.md index 65dd6370..1f6da6cb 100644 --- a/README.md +++ b/README.md @@ -52,12 +52,19 @@ The Cement CLI Application Framework is Open Source and is distributed under the This project includes a `docker-compose` configuration that sets up all required services, and dependencies for development. This is the recommended path for local development, and is the only fully supported option. +The following creates all required docker containers, and launches an ASH shell within the `cement` dev container for development. +``` +$ make dev + +|> cement <| app # +``` + +The above is the equivalent of running: + ``` $ docker-compose up -d $ docker-compose exec cement /bin/ash - -|> cement >| app # ``` ### Vagrant diff --git a/Vagrantfile b/Vagrantfile index b095a37f..c7a728af 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -13,20 +13,20 @@ Vagrant.configure("2") do |config| config.vm.synced_folder ".", "/vagrant", disabled: false config.vm.define "linux" do |this| - this.vm.box = "addle/ubuntu-16.04" + this.vm.box = "trueability/ubuntu-16.04" this.vm.hostname = "linux" this.vm.provision "shell", path: "scripts/vagrant/bootstrap.sh" end config.vm.define "windows" do |this| - this.vm.box = "addle/windows-server-2012-r2" + this.vm.box = "trueability/windows-server-2012-r2" this.vm.hostname = "windows" this.vm.provision "shell", path: "scripts/vagrant/bootstrap.ps1" end targets.each do |name| config.vm.define name do |this| - this.vm.box = "addle/#{name}" + this.vm.box = "trueability/#{name}" this.vm.hostname = name if name.start_with?('windows') diff --git a/scripts/vagrant/bootstrap.ps1 b/scripts/vagrant/bootstrap.ps1 index e878d960..2e7cf4d9 100644 --- a/scripts/vagrant/bootstrap.ps1 +++ b/scripts/vagrant/bootstrap.ps1 @@ -9,7 +9,7 @@ function Do-IEESC { } function Do-WinRM { - # Not sure if this can be improved? It's taken from + # Not sure if this can be improved? It's taken from # https://learn.chef.io/manage-a-node/windows/bootstrap-your-node/ winrm quickconfig -q @@ -17,7 +17,7 @@ function Do-WinRM { winrm set winrm/config '@{MaxTimeoutms="1800000"}' winrm set winrm/config/service '@{AllowUnencrypted="true"}' winrm set winrm/config/service/auth '@{Basic="true"}' - + netsh advfirewall firewall add rule ` name="WinRM 5985" ` protocol=TCP ` @@ -30,7 +30,7 @@ function Do-WinRM { dir=in ` localport=5986 ` action=allow - + net stop winrm sc.exe config winrm start= auto net start winrm @@ -38,20 +38,20 @@ function Do-WinRM { Write-Host "WinRM setup complete" -ForegroundColor Green } -function Do-Python2 { - Invoke-WebRequest ` - -Uri https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi ` - -OutFile python2-installer.msi - - msiexec /i python2-installer.msi /passive ALLUSERS=1 TARGETDIR=C:\Python27 - - Start-Sleep -s 10 - - C:\Python27\Scripts\pip.exe install virtualenv - - Write-Host "Python2 setup complete" -ForegroundColor Green - -} +# function Do-Python2 { +# Invoke-WebRequest ` +# -Uri https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi ` +# -OutFile python2-installer.msi +# +# msiexec /i python2-installer.msi /passive ALLUSERS=1 TARGETDIR=C:\Python27 +# +# Start-Sleep -s 10 +# +# C:\Python27\Scripts\pip.exe install virtualenv +# +# Write-Host "Python2 setup complete" -ForegroundColor Green +# +# } function Do-Python3 { Invoke-WebRequest ` @@ -70,6 +70,6 @@ function Do-Python3 { Do-IEESC Do-WinRM -Do-Python2 +# Do-Python2 Do-Python3 Clear-History