Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Update JVM and Neo4j versions. Launch Neo4j in a separate powershell …
Browse files Browse the repository at this point in the history
…console.
  • Loading branch information
jbgalet committed Mar 5, 2019
1 parent acaed49 commit b723b09
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions Dump/ADCP/ADCPInstances.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# https://cdn.azul.com/zulu/bin/zulu8.30.0.1-jdk8.0.172-win_x64.zip
$jdkFile = "zulu8.30.0.1-jdk8.0.172-win_x64.zip"
$jdkFolder = "zulu8.30.0.1-jdk8.0.172-win_x64"
# https://neo4j.com/artifact.php?name=neo4j-community-3.4.1-windows.zip
$neo4jFile = "neo4j-community-3.4.1-windows.zip"
$neo4jFolder = "neo4j-community-3.4.1"
# https://cdn.azul.com/zulu/bin/zulu8.36.0.1-ca-jdk8.0.202-win_x64.zip
$jdkFile = "zulu8.36.0.1-ca-jdk8.0.202-win_x64.zip"
$jdkFolder = "zulu8.36.0.1-ca-jdk8.0.202-win_x64"
# https://neo4j.com/artifact.php?name=neo4j-community-3.5.3-windows.zip
$neo4jFile = "neo4j-community-3.5.3-windows.zip"
$neo4jFolder = "neo4j-community-3.5.3"
$sourcePath = $PSScriptRoot

function Install-ADCPJava {
Expand Down Expand Up @@ -87,7 +87,7 @@ function Remove-ADCPInstance {
Write-Error "ERROR: Invalid InstanceID"
return
}

Remove-Item -Path $instancePath -Recurse -Force
}

Expand All @@ -106,11 +106,17 @@ function Start-ADCPInstance {
return
}

Import-Module $instancePath\$neo4jFolder\bin\Neo4j-Management -Force
Set-Neo4jEnv -Name "JAVA_HOME" -Value $destPath\$jdkFolder
Remove-Item Env:NEO4J_CONF -ErrorAction SilentlyContinue
Set-Neo4jEnv -Name "NEO4J_HOME" -Value $instancePath\$neo4jFolder
$job_script =[scriptblock]::Create("
`$host.UI.RawUI.WindowTitle = 'Neo4j for instance $instanceID'
Import-Module $instancePath\$neo4jFolder\bin\Neo4j-Management -Force
Set-Neo4jEnv -Name 'JAVA_HOME' -Value $destPath\$jdkFolder
Remove-Item Env:NEO4J_CONF -ErrorAction SilentlyContinue
Set-Neo4jEnv -Name 'NEO4J_HOME' -Value $instancePath\$neo4jFolder
# Launch Neo4j
Invoke-Neo4j console
")

# Launch Neo4j
Invoke-Neo4j console
$proc = Start-Process powershell $job_script
$proc
}

0 comments on commit b723b09

Please sign in to comment.