Skip to content

Commit

Permalink
Update Vagrantfile (#1391)
Browse files Browse the repository at this point in the history
* Update Vagrantfile

Fixes issue where vagrant suspend, vagrant up fails to restart the container.  Discovered as part of CHE-1328 issue with ARTIK IDE.

* Move parameters around
  • Loading branch information
Tyler Jewell authored and Oleksii Kurinnyi committed Jun 6, 2016
1 parent 5ae2fd8 commit 9e9a982
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Vagrant.configure(2) do |config|
HTTPS_PROXY=$2
NO_PROXY=$3
CHE_VERSION=$4
IP=$5
PORT=$6
if [ -n "$HTTP_PROXY" ] || [ -n "$HTTPS_PROXY" ]; then
echo "-------------------------------------"
Expand Down Expand Up @@ -116,17 +118,6 @@ Vagrant.configure(2) do |config|
printf "#"
sleep 10
done
SHELL

config.vm.provision "shell" do |s|
s.inline = $script
s.args = [$http_proxy, $https_proxy, $no_proxy, $che_version]
end

$script2 = <<-SHELL
CHE_VERSION=$1
IP=$2
PORT=$3
echo "--------------------------------"
echo "ECLIPSE CHE: BOOTING ECLIPSE CHE"
Expand All @@ -139,7 +130,17 @@ Vagrant.configure(2) do |config|
`-v /home/user/che/che.properties:/container/che.properties `
`-e CHE_LOCAL_CONF_DIR=/container `
`codenvy/che:${CHE_VERSION} --remote:${IP} --port:${PORT} run &>/dev/null
SHELL

config.vm.provision "shell" do |s|
s.inline = $script
s.args = [$http_proxy, $https_proxy, $no_proxy, $che_version, $ip, $port]
end

$script2 = <<-SHELL
IP=$1
PORT=$2
# Test the default dashboard page to see when it returns a non-error value.
# Che is active once it returns success
while [ true ]; do
Expand All @@ -159,7 +160,7 @@ Vagrant.configure(2) do |config|

config.vm.provision "shell", run: "always" do |s|
s.inline = $script2
s.args = [$che_version, $ip, $port]
s.args = [$ip, $port]
end

end

0 comments on commit 9e9a982

Please sign in to comment.