Skip to content

Commit

Permalink
Merge staging (v1.4.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot authored Jul 18, 2019
2 parents 74d37e5 + 4244d35 commit 53f66f2
Show file tree
Hide file tree
Showing 12 changed files with 293 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
*.zip git-encoding=BINARY zos-working-tree-encoding=BINARY binary
# Always use LF for npm package files because npm cli likes to change line endings.
package*.json text eol=lf
*.sh text eol=lf
# sonar scanning
sonar-project.properties git-encoding=iso8859-1 zos-working-tree-encoding=iso8859-1
45 changes: 45 additions & 0 deletions bin/install-app.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@echo off
REM This program and the accompanying materials are
REM made available under the terms of the Eclipse Public License v2.0 which accompanies
REM this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
REM
REM SPDX-License-Identifier: EPL-2.0
REM
REM Copyright Contributors to the Zowe Project.

if [%1]==[] goto :fail
setlocal
set app_path="%~f1"
if "%ZLUX_INSTALL_LOG_DIR%" == "" (
set ZLUX_INSTALL_LOG_DIR=..\log
)
call :makedir %ZLUX_INSTALL_LOG_DIR%
call :abspath %ZLUX_INSTALL_LOG_DIR%\install.log
set LOG_PATH=%RETVAL%
echo Running installer. Log location=%LOG_PATH%
node "%~dp0..\..\zlux-server-framework\utils\install-app.js" -i "%app_path%" -o "%~dp0..\..\\" -c "%~dp0..\..\zlux-app-server\deploy\instance\ZLUX\serverConfig\zluxserver.json" %2 > %LOG_PATH% 2>&1
endlocal
goto :finished

:fail
echo Usage: install-app.bat AppPath
goto :eof

rem Create a directory if it does not exist yet
:makedir
if not exist %1 mkdir %1
goto :eof

:abspath
set RETVAL=%~dpfn1
exit /B

:finished
echo Ended with rc=%ERRORLEVEL%
REM This program and the accompanying materials are
REM made available under the terms of the Eclipse Public License v2.0 which accompanies
REM this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
REM
REM SPDX-License-Identifier: EPL-2.0
REM
REM Copyright Contributors to the Zowe Project.
46 changes: 46 additions & 0 deletions bin/install-app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh
# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.
if [ $# -eq 0 ]
then
echo "Usage: $0 AppPath"
exit 1
fi

zlux_path=$(cd $(dirname "$0")/../..; pwd)
utils_path=$zlux_path/zlux-server-framework/utils
json_path=$zlux_path/zlux-app-server/deploy/instance/ZLUX/serverConfig/zluxserver.json
app_path=$(cd "$1"; pwd)

shift

cd $zlux_path/zlux-app-server/bin

if [ -z "$ZLUX_INSTALL_LOG_DIR" ]
then
ZLUX_INSTALL_LOG_DIR="$zlux_path/zlux-app-server/log"
fi

if [ ! -d "$ZLUX_INSTALL_LOG_DIR" ]
then
echo "Will make log directory $ZLUX_INSTALL_LOG_DIR"
mkdir -p $ZLUX_INSTALL_LOG_DIR
fi

LOG_FILE="$ZLUX_INSTALL_LOG_DIR/install.log"
echo "utils_path=${utils_path}\napp_path=${app_path}"
echo "Running installer. Log location=$LOG_FILE"
node ${utils_path}/install-app.js -i "$app_path" -c "$json_path" $@ 2>&1 | tee $LOG_FILE

# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.
13 changes: 11 additions & 2 deletions bin/nodeCluster.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

@echo off
REM This program and the accompanying materials are
REM made available under the terms of the Eclipse Public License v2.0 which accompanies
REM this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
Expand All @@ -13,15 +13,24 @@ if "%ZLUX_NODE_LOG_DIR%" == "" (
call :makedir %ZLUX_NODE_LOG_DIR%
set NODE_PATH=../..;../../zlux-server-framework/node_modules;%NODE_PATH%
cd ../lib
call :abspath %ZLUX_NODE_LOG_DIR%\nodeServer.log
set LOG_PATH=%RETVAL%
set minWorkers=2
set NODE_CLUSTER_SCHED_POLICY=rr
node --harmony zluxCluster.js --config=../deploy/instance/ZLUX/serverConfig/zluxserver.json %* > %ZLUX_NODE_LOG_DIR%\nodeServer.log 2>&1
echo Server startup. Log location=%LOG_PATH%
node --harmony zluxCluster.js --config=../deploy/instance/ZLUX/serverConfig/zluxserver.json %* > %LOG_PATH% 2>&1
echo Ended with rc=%ERRORLEVEL%
endlocal
goto :eof

rem Create a directory if it does not exist yet
:makedir
if not exist %ZLUX_NODE_LOG_DIR% mkdir %ZLUX_NODE_LOG_DIR%
goto :eof

:abspath
set RETVAL=%~dpfn1
exit /B
REM This program and the accompanying materials are
REM made available under the terms of the Eclipse Public License v2.0 which accompanies
REM this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
Expand Down
8 changes: 4 additions & 4 deletions bin/nodeCluster.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/sh
# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
Expand Down Expand Up @@ -133,14 +133,14 @@ export minWorkers=2

echo Show Environment
env
echo Show which node
which node
echo Show location of node
type node


echo Starting node

node --harmony zluxCluster.js --config=../deploy/instance/ZLUX/serverConfig/zluxserver.json "$@" 2>&1 | tee $ZLUX_NODE_LOG_FILE

echo "Ended with rc=$?"


# This program and the accompanying materials are
Expand Down
14 changes: 11 additions & 3 deletions bin/nodeServer.bat
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
@echo off
REM This program and the accompanying materials are
REM made available under the terms of the Eclipse Public License v2.0 which accompanies
REM this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
REM
REM SPDX-License-Identifier: EPL-2.0
REM
REM Copyright Contributors to the Zowe Project.

setlocal
if "%ZLUX_NODE_LOG_DIR%" == "" (
set ZLUX_NODE_LOG_DIR="../log"
set ZLUX_NODE_LOG_DIR=..\log
)
call :makedir %ZLUX_NODE_LOG_DIR%
set NODE_PATH=../..;../../zlux-server-framework/node_modules;%NODE_PATH%
cd ../lib
node --harmony zluxServer.js --config=../deploy/instance/ZLUX/serverConfig/zluxserver.json %* > %ZLUX_NODE_LOG_DIR%\nodeServer.log 2>&1
call :abspath %ZLUX_NODE_LOG_DIR%\nodeServer.log
set LOG_PATH=%RETVAL%
echo Server startup. Log location=%LOG_PATH%
node --harmony zluxServer.js --config=../deploy/instance/ZLUX/serverConfig/zluxserver.json %* > %LOG_PATH% 2>&1
echo Ended with rc=%ERRORLEVEL%
endlocal
goto :eof

rem Create a directory if it does not exist yet
:makedir
if not exist %1 mkdir %1
goto :eof

:abspath
set RETVAL=%~dpfn1
exit /B
REM This program and the accompanying materials are
REM made available under the terms of the Eclipse Public License v2.0 which accompanies
REM this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
Expand Down
4 changes: 2 additions & 2 deletions bin/nodeServer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/sh
# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
Expand Down Expand Up @@ -138,7 +138,7 @@ type node
echo Starting node

node --harmony zluxServer.js --config=../deploy/instance/ZLUX/serverConfig/zluxserver.json "$@" 2>&1 | tee $ZLUX_NODE_LOG_FILE

echo "Ended with rc=$?"


# This program and the accompanying materials are
Expand Down
8 changes: 8 additions & 0 deletions config/generate_zlux_certificates.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/sh

# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.

#
# Generates certificate for zLUX that is signed by APIML Certificate Management local CA
#
Expand Down
133 changes: 133 additions & 0 deletions config/tomcat.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
This file inspired by the standard tomcat configuration XML, licensed to
The Apache Software Foundation (ASF) under one or more
contributor license agreements.
You may obtain a copy of that License at:
http://www.apache.org/licenses/LICENSE-2.0
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="${shutdown.port}" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">

<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->


<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
sslProtocol/protocols: https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#SSLContext
-->
<Connector port="${https.port}" protocol="HTTP/1.1"
connectionTimeout="20000"
maxThreads="150"
SSLEnabled="true"
scheme="https"
secure="true"
SSLVerifyClient="none"
SSLProtocol="TLSv1.2"
SSLCipherSuite="HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!kRSA:!SHA1"
SSLCertificateFile="${https.certificate}"
SSLCertificateKeyFile="${https.key}">
</Connector>

<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->

<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">

<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->

<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>

<!-- UnpackWARS: https://wiki.apache.org/tomcat/RemoveUnpackWARs
appBase: Made customizable so that we can point to zowe app services
-->
<Host name="localhost" appBase="${appdir}"
unpackWARs="false" autoDeploy="true">

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />

</Host>
</Engine>
</Service>
</Server>
8 changes: 8 additions & 0 deletions doc/swagger/fileapi.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.

swagger: '2.0'
info:
description: This service describes some of the operations involved with datasets and unix files
Expand Down
8 changes: 8 additions & 0 deletions doc/swagger/security-mgmt-api.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.

swagger: "2.0"
info:
description: "Security Management API"
Expand Down
16 changes: 16 additions & 0 deletions zlux-app-server.ppf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This program and the accompanying materials are made available under the terms of the
Eclipse Public License v2.0 which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
-->
<Project default_configuration_name="Configuration 1" fallback_default_config_name="Configuration 1" file_encoding="ISO-8859-1" file_extension_set_name="javascript" ltd_name="javascript" name="zlux-app-server" version="9.0.3.11">
<Configuration name="Configuration 1"/>
<FileExtensions>
<FileExtension extension="js" is_exclude="false" is_project_exclusion="false" is_valid_assess="true" is_web="false"/>
</FileExtensions>
<Source exclude="false" path="." web="false"/>
<ProjectScanSettings cache_va="false" global_rules="false" string_analysis="false"/>
</Project>

0 comments on commit 53f66f2

Please sign in to comment.