Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions scripts/HyperV/scripts/create-environment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ $novaTemplate = "$templateDir\nova.conf"
$neutronTemplate = "$templateDir\neutron_hyperv_agent.conf"
$hostname = hostname
$rabbitUser = "stackrabbit"
$pythonDir = "c:\Python27"
$pythonDir = "C:\Python27"
$pythonArchive = "python27new.tar.gz"
$pythonExec = "$pythonDir\python.exe"

$openstackLogs="$openstackDir\Log"
Expand Down Expand Up @@ -167,22 +168,18 @@ if ($hasConfigDir -eq $false){
mkdir $remoteConfigs\$hostname
}

pushd \
if (Test-Path "C:\python27new.tar.gz")
pushd C:\
if (Test-Path $pythonArchive)
{
Remove-Item -Force "C:\python27new.tar.gz"
Remove-Item -Force $pythonArchive
}
Invoke-WebRequest -Uri http://dl.openstack.tld/python27new.tar.gz -OutFile C:\python27new.tar.gz
if (Test-Path "C:\Python27")
Invoke-WebRequest -Uri http://dl.openstack.tld/python27new.tar.gz -OutFile $pythonArchive
if (Test-Path $pythonDir)
{
Remove-Item -Recurse -Force .\Python27
Remove-Item -Recurse -Force $pythonDir
}
& C:\mingw-get\msys\1.0\bin\tar.exe -xvzf python27new.tar.gz
& easy_install pip
& pip install -U setuptools
& pip install -U wmi
& pip install --use-wheel --no-index --find-links=http://dl.openstack.tld/wheels cffi
popd
Write-Host "Ensure Python folder is up to date"
& C:\mingw-get\msys\1.0\bin\tar.exe -xvzf "$pythonArchive"

$hasPipConf = Test-Path "$env:APPDATA\pip"
if ($hasPipConf -eq $false){
Expand All @@ -194,6 +191,11 @@ else
}
Add-Content "$env:APPDATA\pip\pip.ini" $pip_conf_content

& easy_install pip
& pip install -U setuptools
& pip install -U wmi
& pip install --use-wheel --no-index --find-links=http://dl.openstack.tld/wheels cffi
popd

cp $templateDir\distutils.cfg C:\Python27\Lib\distutils\distutils.cfg

Expand Down