Skip to content

Commit

Permalink
[TUBEMQ-226] Add Windows startup scripts (#141)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel Zhou <gabrielzhou@tencent.com>
  • Loading branch information
hystericalhell and Gabriel Zhou committed Jun 21, 2020
1 parent 6f914db commit b38de8a
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
28 changes: 28 additions & 0 deletions bin/broker.cmd
@@ -0,0 +1,28 @@
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements. See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License. You may obtain a copy of the License at
REM <p>
REM http://www.apache.org/licenses/LICENSE-2.0
REM <p>
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

REM Windows Startup Script for Broker Node
REM please do not change any command or variable in this script, check out
REM env.cmd for details.

setlocal
call "%~dp0env.cmd"

set BROKERMAIN=org.apache.tubemq.server.tools.BrokerStartup
set BROKERCFG=%~dp0../conf/broker.ini

echo on
call %JAVA% %BROKER_JVM_OPTS% %GENERIC_ARGS% "%BROKERMAIN%" -f "%BROKERCFG%"
endlocal
31 changes: 31 additions & 0 deletions bin/env.cmd
@@ -0,0 +1,31 @@
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements. See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License. You may obtain a copy of the License at
REM <p>
REM http://www.apache.org/licenses/LICENSE-2.0
REM <p>
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

REM Windows Startup Script about Environment Settings
REM Java runtime evironment could be specified here.

set BASE_DIR=%~dp0..
set CLASSPATH=%BASE_DIR%\lib\*;%BASE_DIR%\tubemq-server\target\*;%CLASSPATH%
set GENERIC_ARGS="-Dtubemq.home=%BASE_DIR%" -cp "%CLASSPATH%" "-Dlog4j.configuration=file:%BASE_DIR%\conf\master.log4j.properties"

REM If there's no system-wide JAVA_HOME or there's need to run on specific Java,
REM please uncomment the following JAVA_HOME line, and specify the java home path.
REM set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_241

set JAVA="%JAVA_HOME%\bin\java"

REM One may add extra Java runtime flags in addition to each role: Master or Broker
set MASTER_JVM_OPTS=-Xmx1g -Xms256m -server
set BROKER_JVM_OPTS=-Xmx1g -Xms512g -server
28 changes: 28 additions & 0 deletions bin/master.cmd
@@ -0,0 +1,28 @@
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements. See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License. You may obtain a copy of the License at
REM <p>
REM http://www.apache.org/licenses/LICENSE-2.0
REM <p>
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

REM Windows Startup Script for Master Node
REM please do not change any command or variable in this script, check out
REM env.cmd for details.

setlocal
call "%~dp0env.cmd"

set MASTERMAIN=org.apache.tubemq.server.tools.MasterStartup
set MASTERCFG=%~dp0..\conf\master.ini

echo on
call %JAVA% %MASTER_JVM_OPTS% %GENERIC_ARGS% "%MASTERMAIN%" -f "%MASTERCFG%"
endlocal

0 comments on commit b38de8a

Please sign in to comment.