You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by wi...@apache.org on 2020/04/27 09:06:16 UTC
[incubator-streampipes-installer] 03/03: remove SP_HOST,
SP_KAFKA_HOST variable from script and env file,
removed elastic and kibana from full deployment
This is an automated email from the ASF dual-hosted git repository.
wiener pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-installer.git
commit 32484b79bfddd6d1e1ff82eaba33dc085e5646f4
Author: Patrick Wiener <wi...@fzi.de>
AuthorDate: Mon Apr 27 11:05:52 2020 +0200
remove SP_HOST, SP_KAFKA_HOST variable from script and env file, removed elastic and kibana from full deployment
---
installer/osx_linux/streampipes | 106 ++++------------------------
installer/templates/.env | 4 +-
installer/templates/docker-compose.full.yml | 79 ++++++---------------
installer/templates/docker-compose.lite.yml | 12 ++--
installer/windows10/streampipes.ps1 | 28 ++++----
5 files changed, 52 insertions(+), 177 deletions(-)
diff --git a/installer/osx_linux/streampipes b/installer/osx_linux/streampipes
index 5dace57..d6f8062 100755
--- a/installer/osx_linux/streampipes
+++ b/installer/osx_linux/streampipes
@@ -15,6 +15,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+deployment_notice() {
+ echo
+ echo
+ echo "INFO: StreamPipes $1 is now ready to be used on your system"
+ echo " Check https://streampipes.apache.org/ for information on StreamPipes"
+ echo
+ echo " Go to the UI and follow the instructions to get started: http://$2/"
+ echo
+}
+
if [ -z "$1" ] || [ "$#" -lt 1 ];
then
echo "Use 'streampipes start' to start StreamPipes, 'streampipes stop' to stop it, and 'streampipes clean' to remove streampipes."
@@ -72,106 +82,14 @@ if [ ! -f ./docker-compose.yml ];
cp ../templates/.env ./.env
- if [ $1 == "start" ] && [ "$#" -gt 1 ] && [ $2 == "-ip" ];
- then
- # Check OS type
- OS_TYPE="$(uname -s)"
- case $OS_TYPE in
- Linux*)
- # If Unix
- rawip=$(ip address list | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
-
- rawip=`echo $rawip | sed 's/(%s)*\n/ /g'`
- IFS=' ' declare -a 'allips=($rawip)'
-
- allips+=( 'Enter IP manually' )
-
- echo ''
- echo 'Please select your IP address or add one manually: '
- PS3='Select option: '
- select opt in "${allips[@]}"
- do
- if [ -z "${opt}" ];
- then
- echo "Wrong input select one of the options";
- else
- ip="$opt"
-
- if [ "$opt" == "Enter IP manually" ];
- then
- read -p "Enter Ip: " ip
- fi
- break
- fi
- done
-
- # OS dependent
- sed -i -e "s/SP_HOST=.*/SP_HOST=${ip}/g" .env
- sed -i -e "s/SP_KAFKA_HOST=.*/SP_KAFKA_HOST=${ip}/g" .env
- ;;
- Darwin*)
- # If Darwin (MacOS)
- rawip=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
-
- rawip=`echo $rawip | sed 's/(%s)*\n/ /g'`
- IFS=' ' declare -a 'allips=($rawip)'
-
- allips+=( 'Enter IP manually' )
-
- echo ''
- echo 'Please select your IP address or add one manually: '
- PS3='Select option: '
- select opt in "${allips[@]}"
- do
- if [ -z "${opt}" ];
- then
- echo "Wrong input select one of the options";
- else
- ip="$opt"
-
- if [ "$opt" == "Enter IP manually" ];
- then
- read -p "Enter Ip: " ip
- fi
- break
- fi
- done
-
- # OS dependent
- sed -i '' -e "s/SP_HOST=.*/SP_HOST=${ip}/g" .env
- sed -i '' -e "s/SP_KAFKA_HOST=.*/SP_KAFKA_HOST=${ip}/g" .env
- ;;
- CYGWIN*)
- # If Windows
- ip=$(ipconfig | grep -Eo '(IPv4.*)' | grep -Eo '([0-9]*\.){3}[0-9]*' | tail -1)
- # Workaround for Kafka (https://github.com/docker/for-win/issues/1829)
- export COMPOSE_CONVERT_WINDOWS_PATHS=1
-
- # OS dependent
- sed -i -e "s/SP_HOST=.*/SP_HOST=${ip}/g" .env
- sed -i -e "s/SP_KAFKA_HOST=.*/SP_KAFKA_HOST=${ip}/g" .env
- ;;
- MINGW64_NT*)
- # If Windows
- ip=$(ipconfig | grep -Eo '(IPv4.*)' | grep -Eo '([0-9]*\.){3}[0-9]*' | tail -1)
- # Workaround for Kafka (https://github.com/docker/for-win/issues/1829)
- export COMPOSE_CONVERT_WINDOWS_PATHS=1
-
- # OS dependent
- sed -i -e "s/SP_HOST=.*/SP_HOST=${ip}/g" .env
- sed -i -e "s/SP_KAFKA_HOST=.*/SP_KAFKA_HOST=${ip}/g" .env
- ;;
- *)
- fatal "Unsupported OS $OS_TYPE"
- esac
- fi
fi
docker-compose pull
docker-compose up -d
if [ $? -eq 0 ]; then
- echo "StreamPipes successfully started. open Browser and navigate to 'http://localhost'"
+ SP_VERSION=`grep SP_VERSION ".env" | awk -F= '{print $2}'`
+ deployment_notice $SP_VERSION "localhost"
else
echo "ERROR: There was a problem while starting StreamPipes"
fi
diff --git a/installer/templates/.env b/installer/templates/.env
index 31fa8d2..bcf77db 100644
--- a/installer/templates/.env
+++ b/installer/templates/.env
@@ -13,7 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SP_HOST=kafka
-SP_BACKEND_VERSION=0.65.1-SNAPSHOT
-SP_PE_VERSION=0.65.1-SNAPSHOT
+SP_VERSION=0.65.1-SNAPSHOT
SP_DOCKER_REGISTRY=apachestreampipes
diff --git a/installer/templates/docker-compose.full.yml b/installer/templates/docker-compose.full.yml
index ded3a4a..805f82b 100644
--- a/installer/templates/docker-compose.full.yml
+++ b/installer/templates/docker-compose.full.yml
@@ -98,7 +98,7 @@ services:
#### StreamPipes services
backend:
- image: "${SP_DOCKER_REGISTRY}/backend:${SP_BACKEND_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/backend:${SP_VERSION}"
depends_on:
- consul
- couchdb
@@ -111,7 +111,7 @@ services:
spnet:
connect-master:
- image: "${SP_DOCKER_REGISTRY}/streampipes-connect-container:${SP_BACKEND_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/streampipes-connect-container:${SP_VERSION}"
depends_on:
- consul
- couchdb
@@ -127,7 +127,7 @@ services:
spnet:
connect-worker-main:
- image: "${SP_DOCKER_REGISTRY}/connect-worker:${SP_BACKEND_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/connect-worker:${SP_VERSION}"
depends_on:
- consul
- couchdb
@@ -142,7 +142,7 @@ services:
spnet:
nginx:
- image: "${SP_DOCKER_REGISTRY}/ui:${SP_BACKEND_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/ui:${SP_VERSION}"
ports:
- "80:80"
depends_on:
@@ -157,63 +157,63 @@ services:
#### Lite version pipeline elements
processors-filters-jvm:
- image: "${SP_DOCKER_REGISTRY}/processors-filters-jvm:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-filters-jvm:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
processors-filters-siddhi:
- image: "${SP_DOCKER_REGISTRY}/processors-filters-siddhi:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-filters-siddhi:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
processors-image-processing-jvm:
- image: "${SP_DOCKER_REGISTRY}/processors-image-processing-jvm:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-image-processing-jvm:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
processors-transformation-jvm:
- image: "${SP_DOCKER_REGISTRY}/processors-transformation-jvm:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-transformation-jvm:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
sinks-brokers-jvm:
- image: "${SP_DOCKER_REGISTRY}/sinks-brokers-jvm:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/sinks-brokers-jvm:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
sinks-databases-jvm:
- image: "${SP_DOCKER_REGISTRY}/sinks-databases-jvm:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/sinks-databases-jvm:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
sinks-internal-jvm:
- image: "${SP_DOCKER_REGISTRY}/sinks-internal-jvm:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/sinks-internal-jvm:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
sinks-notifications-jvm:
- image: "${SP_DOCKER_REGISTRY}/sinks-notifications-jvm:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/sinks-notifications-jvm:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
sources-watertank-simulator:
- image: "${SP_DOCKER_REGISTRY}/sources-watertank-simulator:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/sources-watertank-simulator:${SP_VERSION}"
depends_on:
- "consul"
- "kafka"
@@ -223,49 +223,49 @@ services:
#### Full version pipeline elements
processors-aggregation-flink:
- image: "${SP_DOCKER_REGISTRY}/processors-aggregation-flink:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-aggregation-flink:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
processors-enricher-flink:
- image: "${SP_DOCKER_REGISTRY}/processors-enricher-flink:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-enricher-flink:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
processors-pattern-detection-flink:
- image: "${SP_DOCKER_REGISTRY}/processors-pattern-detection-flink:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-pattern-detection-flink:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
processors-statistics-flink:
- image: "${SP_DOCKER_REGISTRY}/processors-statistics-flink:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-statistics-flink:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
processors-transformation-flink:
- image: "${SP_DOCKER_REGISTRY}/processors-transformation-flink:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/processors-transformation-flink:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
sinks-databases-flink:
- image: "${SP_DOCKER_REGISTRY}/sinks-databases-flink:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/sinks-databases-flink:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
sources-vehicle-simulator:
- image: "${SP_DOCKER_REGISTRY}/sources-vehicle-simulator:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/sources-vehicle-simulator:${SP_VERSION}"
depends_on:
- "consul"
- "kafka"
@@ -316,43 +316,6 @@ services:
networks:
spnet:
- elasticsearch:
- image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.3
- environment:
- - cluster.name=streampipes-cluster
- - bootstrap.memory_lock=true
- - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- - "discovery.zen.ping.unicast.hosts=elasticsearch"
- ports:
- - "9200:9200"
- - "9300:9300"
- ulimits:
- memlock:
- soft: -1
- hard: -1
- volumes:
- - elastic:/usr/share/elasticsearch/data
- networks:
- spnet:
-
- kibana:
- image: docker.elastic.co/kibana/kibana-oss:6.2.3
- environment:
- SERVER_NAME: ${SP_HOST}
- ELASTICSEARCH_URL: http://elasticsearch:9200
- ports:
- - "5601:5601"
- networks:
- spnet:
-
- iotdb:
- image: xingtanzjr/iotdb
- volumes:
- - iotdb:/iotdb/data
- ports:
- - 6667:6667
- networks:
- spnet:
volumes:
backend:
@@ -363,8 +326,6 @@ volumes:
kafka:
zk-conf:
zk-data:
- elastic:
- iotdb:
networks:
diff --git a/installer/templates/docker-compose.lite.yml b/installer/templates/docker-compose.lite.yml
index 3e9ff89..13b0228 100644
--- a/installer/templates/docker-compose.lite.yml
+++ b/installer/templates/docker-compose.lite.yml
@@ -115,7 +115,7 @@ services:
#### StreamPipes services
backend:
- image: "${SP_DOCKER_REGISTRY}/backend:${SP_BACKEND_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/backend:${SP_VERSION}"
depends_on:
- consul
- couchdb
@@ -127,7 +127,7 @@ services:
spnet:
connect-master:
- image: "${SP_DOCKER_REGISTRY}/streampipes-connect-container:${SP_BACKEND_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/streampipes-connect-container:${SP_VERSION}"
depends_on:
- consul
- couchdb
@@ -143,7 +143,7 @@ services:
spnet:
connect-worker-main:
- image: "${SP_DOCKER_REGISTRY}/connect-worker:${SP_BACKEND_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/connect-worker:${SP_VERSION}"
depends_on:
- consul
- couchdb
@@ -158,7 +158,7 @@ services:
spnet:
nginx:
- image: "${SP_DOCKER_REGISTRY}/ui:${SP_BACKEND_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/ui:${SP_VERSION}"
ports:
- "80:80"
depends_on:
@@ -173,14 +173,14 @@ services:
#### Lite version pipeline elements
pipeline-elements-all-jvm:
- image: "${SP_DOCKER_REGISTRY}/pipeline-elements-all-jvm:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/pipeline-elements-all-jvm:${SP_VERSION}"
depends_on:
- "consul"
networks:
spnet:
sources-watertank-simulator:
- image: "${SP_DOCKER_REGISTRY}/sources-watertank-simulator:${SP_PE_VERSION}"
+ image: "${SP_DOCKER_REGISTRY}/sources-watertank-simulator:${SP_VERSION}"
depends_on:
- "consul"
- "kafka"
diff --git a/installer/windows10/streampipes.ps1 b/installer/windows10/streampipes.ps1
index 3bcdb40..3bdef88 100644
--- a/installer/windows10/streampipes.ps1
+++ b/installer/windows10/streampipes.ps1
@@ -28,7 +28,7 @@ $dockerCompose = $currentDir + "/docker-compose.yml"
$configFolder = $currentDir + "/config"
function Show-Menu
-{
+{
Write-Host "StreamPipes can be started in two different setups:"
Write-Host ""
Write-Host "1: StreamPipes Lite (few pipeline elements, needs less memory)"
@@ -39,7 +39,7 @@ function Show-Menu
if ($args[0] -eq "start")
{
-
+
Write-Host ' _______ __ ______ __ '
Write-Host '| __| |_.----.-----.---.-.--------.| __ \__|.-----.-----.-----.'
Write-Host '|__ | _| _| -__| _ | || __/ || _ | -__|__ --|'
@@ -48,7 +48,7 @@ if ($args[0] -eq "start")
Write-Host ''
Write-Host 'Welcome to StreamPipes!'
Write-Host ''
-
+
if (!(Test-Path ($dockerCompose)))
{
do
@@ -60,7 +60,7 @@ if ($args[0] -eq "start")
'1' {
$version="lite"
break
-
+
} '2' {
$version="full"
break
@@ -69,7 +69,7 @@ if ($args[0] -eq "start")
pause
}
until (($input -eq '1') -Or ($input -eq '2'))
-
+
Copy-Item $envFileTemp -Destination $envFileDest
if ($version -eq "lite")
{
@@ -79,13 +79,7 @@ if ($args[0] -eq "start")
{
Copy-Item $dockerComposeFullTemp -Destination $dockerCompose
}
- if ($args[1] -eq "-ip")
- {
- $ip = (Get-NetIPConfiguration | Where-Object { $_.IPv4DefaultGateway -ne $null -and $_.NetAdapter.Status -ne "Disconnected" }).IPv4Address.IPAddress
- (Get-Content $envFileDest).replace('SP_HOST=kafka', 'SP_HOST=' +$ip) | Set-Content $envFileDest
- (Get-Content $envFileDest).replace('SP_KAFKA_HOST=kafka', 'SP_KAFKA_HOST=' +$ip) | Set-Content $envFileDest
- }
- }
+ }
Invoke-Expression "docker-compose -f $dockerCompose pull"
@@ -93,7 +87,13 @@ if ($args[0] -eq "start")
if ($LASTEXITCODE -eq 0)
{
- Write-Host "StreamPipes successfully started. Open browser and navigate to 'localhost"
+ Write-Host
+ Write-Host
+ Write-Host "INFO: StreamPipes is now ready to be used on your system"
+ Write-Host " Check https://streampipes.apache.org/ for information on StreamPipes"
+ Write-Host
+ Write-Host " Go to the UI and follow the instructions to get started: http://localhost/"
+ Write-Host
}
else
{
@@ -120,5 +120,3 @@ if ($args[0] -eq "stop" -Or $args[0] -eq "clean")
Write-Host "All StreamPipes system information was deleted. The system can now be installed again."
}
}
-
-