Commit 7d66206b by Gil Sade

first virsion

parents
Showing with 3774 additions and 0 deletions
Automated jmeter tests
[install jmeter]
- download jmeter
- install jmeter standard set http://jmeter-plugins.org/downloads/all/
- extract jar to lib/ext
[recording]
- record script using blazemeter chrome plugin
- after recording, click on the edit icon
- in the edit page save as json
- goto http://converter.blazemeter.com/ and convert to jmx
[edit file]
- open the jmx file in jmeter gui
- remove first timer "jp@gc - Throughput Shaping Timer"
- go over the POST requests: copy and url param (including the '?') from the name and append
the line to the 'Path' edit line.
- run the test in the gui and verify it's working.
[running]
- from jmeter/bin folder run ./jmeter -n -t [your jmx file] -l /tmp/Test.jt
No preview for this file type
<?xml version="1.0"?>
<!-- mvn -f file-name.xml dependency:copy-dependencies -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik.download</groupId>
<artifactId>swagger-servlet-download</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Simple POM to download core and dependencies</name>
<url>http://github.com/Netflix/Hystrix</url>
<dependencies>
<dependency>
<groupId>com.wordnik</groupId>
<artifactId>swagger-servlet_2.10</artifactId>
<version>1.3.12</version>
<scope/>
</dependency>
</dependencies>
</project>
\ No newline at end of file
elasticsearch on mongo:
https://coderwall.com/p/sy1qcw
the files are in CM/OS/Common/
mongo :
- http://docs.mongodb.org/manual/tutorial/convert-standalone-to-replica-set/
- bind_ip in /etc/mongod.conf should point to ip of hostname configure replica
- elastic search:
- download elasticsearch version 1.2.2 or install elasticsearch-1.2.2.deb
- $ES_HOME/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.6.0 where $ES_HOME
is /usr/share/elasticsearch
- $ES_HOME/bin/plugin -install [path_to_file:elasticsearch-river-mongodb-2.0.1-SNAPSHOT.zip]
example when file is under /tmp:
bin/plugin --url file:///tmp/elasticsearch-river-mongodb-2.0.1-SNAPSHOT.zip --install river-mongodb
- start elastic search: sudo service elasticsearch start
- script to add elastic to mongo db gallery and collection activities
#!/bin/sh
curl -XPUT "localhost:9200/_river/mcz/_meta" -d '
{
"type": "mongodb",
"mongodb": {
"servers": [
{ "host": "172.16.1.244", "port": 27017 }
],
"options": { "secondary_read_preference": true },
"db": "mcz",
"collection": "activities"
},
"index": {
"name": "activityidx",
"type": "activity"
}
}'
change the elasticsearch.yml in /etc/elasticsearch (has new cluster name)
- getting activities:
curl -XGET 'http://localhost:9200/activityidx/_search?*'
- download kibana
open the zip file under /var/www/html
change directory from kibana_3.1.2 to kibana
update config.js to the IP of the server
login via browser to host/kibana
example:
172.16.1.71/kibana
TOOLS FOR ELASTICSEARCH:
- elasticsearch-HQ:
sudo plugin -install royrusso/elasticsearch-HQ
then goto http://localhost:9200/_plugin/HQ/
-
PROBLEMS:
https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/449
download:
- swagger-codegen-cli-2.1.4.jar from http://mvnrepository.com/artifact/io.swagger/swagger-codegen-cli/2.1.4
- http://172.16.1.132:8081/repository/internal/io/swagger/msJavaServer-swagger-codegen/1.0.0/msJavaServer-swagger-codegen-1.0.0.jar
create a swagger document on swagger editor and choose 'File >> download json'
a 'swagger.json' file will be downloaded.
run:
java -cp msJavaServer-swagger-codegen-1.0.0.jar:swagger-codegen-cli-2.1.4.jar io.swagger.codegen.SwaggerCodegen generate -l msJavaServer -i [/path-to-swagger.json] -o myMsJava
Lighttpd-improved
with cache
- install lighttpd-1.4.26.modcache.v.1.8.3-2.tar.gz
- copy /usr/share/doc/lighttpd/doc/lighttpd.conf to /etc/lighttpd/
- mkdir /var/log/lighttpd/ (under sudo)
- mkdir /data/cache (under sudo if needed)
- change proxy.server host to you ip and port to mcweb port
- run sudo lighttpd -f /etc/lighttpd/lighttpd.conf
- install latest
http://linuxg.net/how-to-install-gradle-2-1-on-ubuntu-14-10-ubuntu-14-04-ubuntu-12-04-and-derivatives/
- install gradle ide pack from market place
- after restart right-click on project -> 'Configure'->convert to gradle
- add build.gradle file
- repositories:
internal: maven { url "http://172.16.1.132:8081/repository/internal" }
external: mavenCentral()
maven { url "http://mandubian-mvn.googlecode.com/svn/trunk/mandubian-mvn/repository" }
- where to look for jars:
https://oss.sonatype.org/#welcome
http://mvnrepository.com/
http://172.16.1.132:8081
- after adding all dependencies: right-click on project -> Gradle -> refresh dependencies
\ No newline at end of file
[ab]
SOAP:
DeviceInstance:
ab -T "text/xml;charset=UTF-8" -n 5000 -c 100 -p /home/amir/svn/MCZ/doc/getDeviceInstance.xml http://localhost:9001/ds/DeviceInstances
countActivities:
ab -T "text/xml;charset=UTF-8" -n 6000 -c 600 -p /home/amir/svn/MCZ/doc/countActivities.xml http://localhost:9001/ds/Activities
getSubscriberByUserName:
ab -T "text/xml;charset=UTF-8" -n 5 -c 1 -p /home/amir/svn/MCZ/doc/getSubscriberByUserName.xml http://localhost:9001/ds/Subscribers
getGroupsOfContactsByUserName:
ab -T "text/xml;charset=UTF-8" -n 5 -c 1 -p /home/amir/svn/MCZ/doc/getGroupsOfContactsByUserName.xml http://localhost:9001/ds/Subscribers
getChatAttendeesOfSubscriber:
ab -T "text/xml;charset=UTF-8" -n 5 -c 1 -p /home/amir/svn/MCZ/doc/getChatAttendeesOfSubscriber.xml http://localhost:9001/ds/ChatAttendees
getChatAttendeesByChatRoomId:
ab -T "text/xml;charset=UTF-8" -n 5 -c 1 -p /home/amir/svn/MCZ/doc/getChatAttendeesByChatRoomId.xml http://localhost:9001/ds/ChatAttendees
getActivities:
ab -T "text/xml;charset=UTF-8" -n 5 -c 1 -p /home/amir/svn/MCZ/doc/getActivities.xml http://localhost:9001/ds/Activities
Rest:
ab -T "text/plain;charset=UTF-8" -n 5000 -c 500 http://localhost:9001/ds/rest/deviceInstance/getAllInstancesOfDevice/919212103796
[httperf]
httperf --server localhost --port 9001 --uri /ds/deviceInstance/getAllInstancesOfDevice/919212103796.htm --rate 150 --num-conn 4500 --num-call 1 --timeout 5
httperf --hog --session-cookie --server=localhost --port=7001 --wsesslog=1,0,login_session.txt --rate=5
\ No newline at end of file
The file could not be displayed because it is too large.
No preview for this file type
No preview for this file type
#!/bin/sh
curl -XPUT "localhost:9200/_river/gallery/_meta" -d '
{
"type": "mongodb",
"mongodb": {
"servers": [
{ "host": "172.16.1.244", "port": 27017 }
],
"options": { "secondary_read_preference": true },
"db": "gallery",
"collection": "activities"
},
"index": {
"name": "activityidx",
"type": "activity"
}
}'
#!/bin/sh
OP=$1
if [ $OP = "start" ]
then
echo "Starting mcx ..."
./startResin.sh start
./startPublicSaftey.sh > publicSafteyStart.log
./startDataLogic.sh > dataLogicStart.log
else
echo "Stopping mcx ..."
./startResin.sh stop
./stopPublicSaftey.sh > publicSafteyStart.log
./stopDataLogic.sh > dataLogicStart.lo
fi
#!/bin/sh
java -DconfigFile.location=/opt/mcx/config/DataLogic/config.properties -jar ../bin/data-logic.jar &
#!/bin/sh
java -DconfigFile.location=/opt/mcx/config/PublicSafety/config.properties -jar ../bin/PublicSafety.jar &
#!/bin/sh
/home/adi/resin-4.0.41/bin/resin.sh $1 -Dds.ip=172.16.1.151:8080 -Dds.ip.address=172.16.1.151 -Dredis.port=6379 -Dmongodb.port=27017 -Dmclogic.sip.ip=172.16.1.151:5076 -Dmclogic.ip=172.16.1.151:8080 -Dmcpresence.ip=1.1.1.1:9999 -Dmcpresence.sip.ip=1.1.1.1:9999 -Dmcweb.ip=172.16.1.151:8080 -Dmcweb.sip.ip=172.16.1.151:5076 -DconfigFile.location=/opt/mcx/config/ -Djava.awt.headless=true -Dmcz.files.location=/opt/mcz/
#!/bin/bash
PID=`pgrep -f data-logic.jar`
kill -9 $PID
if [ $? -eq 0 ]
then
echo "dataLogic stopped successfully"
else
echo "Failed to stop dataLogic"
fi
#!/bin/bash
PID=`pgrep -f PublicSafety.jar`
kill -9 $PID
if [ $? -eq 0 ]
then
echo "publicSafety stopped successfully"
else
echo "Failed to stop publicSafety"
fi
The file could not be displayed because it is too large.
[start command]
java -jar jenkins.war --httpPort=8100 --httpsListenAddress=[your ip address]
[get job xml]
http://jenkins-server:port/job/[job-name]/config.xml
FROM domeos/java:jdk7
MAINTAINER <devops@ipgallery.com>
ENV RESIN_VERSION 4.0.45
ENV RESIN_HOME /opt/resin
ENV JAVA_HOME /opt/jdk
ENV PATH=${RESIN_HOME}/bin;${PATH}
WORKDIR /opt
RUN curl -ssL http://caucho.com/download/resin-pro-${RESIN_VERSION}.tar.gz -o resin.tar.gz && \
tar -zxvf resin.tar.gz && \
rm -rf resin.tar.gz && \
mv resin-pro-${RESIN_VERSION} resin
#RUN /opt/resin/configure --prefix=`pwd` && make && make install
EXPOSE 8080
EXPOSE 8443
EXPOSE 9080
VOLUME "/opt/resin/webapps"
WORKDIR /opt/resin
ADD src/resin.properties /etc/resin/
ADD src/cluster-default.xml /etc/resin/
ADD src/resin.sh /opt/resin/bin/
RUN chmod +x /opt/resin/bin/resin.sh
#ADD ./mcweb.war /opt/resin/webapps/
#COPY log4j.xml /logs/conf/
#COPY config.properties /opt/mcx/config/mcweb/
#COPY brands.json /opt/mcx/config/mcweb/
#ENTRYPOINT ["/opt/resin/bin/resin.sh", "console"]
\ No newline at end of file
#FROM n3ziniuka5/ubuntu-oracle-jdk:14.10-JDK7
FROM vertigomedia/ubuntu-jdk7
MAINTAINER <devops@ipgallery.com>
ENV RESIN_VERSION 4.0.45
ENV RESIN_HOME /opt/resin
ENV JAVA_HOME /opt/jdk
ENV PATH=${RESIN_HOME}/bin;${PATH}
WORKDIR /opt
RUN apt-get update && apt-get install -y curl
RUN curl -ssL http://caucho.com/download/resin-pro-${RESIN_VERSION}.tar.gz -o resin.tar.gz && \
tar -zxvf resin.tar.gz && \
rm -rf resin.tar.gz && \
mv resin-pro-${RESIN_VERSION} resin
#RUN /opt/resin/configure --prefix=`pwd` && make && make install
EXPOSE 8080
EXPOSE 8443
EXPOSE 9080
VOLUME "/opt/resin/webapps"
WORKDIR /opt/resin
ADD src/resin.properties /etc/resin/
ADD src/cluster-default.xml /etc/resin/
ADD src/resin.sh /opt/resin/bin/
RUN chmod +x /opt/resin/bin/resin.sh
#ADD ./mcweb.war /opt/resin/webapps/
#COPY log4j.xml /logs/conf/
#COPY config.properties /opt/mcx/config/mcweb/
#COPY brands.json /opt/mcx/config/mcweb/
#ENTRYPOINT ["/opt/resin/bin/resin.sh", "console"]
\ No newline at end of file
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="urn:java:com.caucho.resin">
<!--
- default configuration applied to all clusters
-->
<cluster-default>
<!-- shared webapp jars for non-classloader-aware libraries -->
<web-app-default>
<class-loader>
<library-loader path="${resin.root}/webapp-jars"/>
<library-loader path="${resin.root}/webapp.d/lib"/>
<library-loader path="config:/webapp.d/lib"/>
</class-loader>
</web-app-default>
<!-- shared jars and drivers for the app-tier -->
<class-loader>
<tree-loader path="${resin.root}/${cluster.id}-inf"/>
</class-loader>
<!-- enables development error pages -->
<resin:if test="${dev_mode}">
<development-mode-error-page/>
</resin:if>
<!--
- Enables the proxy cache (available in Resin Professional)
-->
<resin:if test="${proxy_cache_enable}">
<proxy-cache memory-size="${proxy_cache_size}">
<!-- Vary header rewriting for IE -->
<rewrite-vary-as-private/>
</proxy-cache>
</resin:if>
<!--
- Admin services
-->
<resin:if test="${remote_admin_enable}">
<resin:RemoteAdminService/>
</resin:if>
<resin:AdminServices/>
<resin:if test="${elastic_cloud_enable}">
<resin:ElasticCloudService/>
</resin:if>
<!-- defaults for each server, i.e. JVM -->
<server-default>
<jvm-arg-line>${jvm_args}</jvm-arg-line>
<jvm-mode>${jvm_mode}</jvm-mode>
<!--
- If starting Resin as root on Unix, specify the user name
- and group name for the web server user.
-->
<user-name>${setuid_user}</user-name>
<group-name>${setuid_group}</group-name>
<port-default>
<port-thread-max>${port_thread_max}</port-thread-max>
<accept-thread-min>${accept_thread_min}</accept-thread-min>
<accept-thread-max>${accept_thread_max}</accept-thread-max>
<keepalive-max>${keepalive_max?:-1}</keepalive-max>
<tcp-cork>${tcp_cork}</tcp-cork>
</port-default>
<sendfile-enable>${sendfile}</sendfile-enable>
<keepalive-select-enable>${keepalive_select_enable}</keepalive-select-enable>
<!-- The http port -->
<http address="${http_address?:'*'}" port="${http}"/>
<!-- SSL port configuration: -->
<resin:choose>
<resin:when test="${openssl_file != null}">
<http address="${http_address?:'*'}" port="${https}">
<openssl>
<certificate-file>${file_lookup(openssl_file,__DIR__)}</certificate-file>
<certificate-key-file>${file_lookup(openssl_key, __DIR__)}</certificate-key-file>
<password>
<resin:Password>${openssl_password}</resin:Password>
</password>
</openssl>
</http>
</resin:when>
<resin:when test="${jsse_keystore_file != null}">
<http address="${http_address?:'*'}" port="${https}">
<jsse-ssl>
<key-store-type>${jsse_keystore_type?:'jks'}</key-store-type>
<key-store-file>${jsse_keystore_file}</key-store-file>
<password>
<resin:Password>${jsse_keystore_password}</resin:Password>
</password>
</jsse-ssl>
</http>
</resin:when>
<resin:when test="${class_exists('sun.security.x509.CertAndKeyGen')}">
<http address="${http_address?:'*'}" port="${https}">
<jsse-ssl self-signed-certificate-name="resin@localhost"/>
</http>
</resin:when>
</resin:choose>
</server-default>
<!--
- Default host configuration applied to all virtual hosts.
-->
<host-default>
<access-log path="log/access.log"
format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
rollover-period="1W"/>
<!--
- Defaults applied to each web-app.
-->
<web-app-default>
<prologue>
<allow-servlet-el/>
</prologue>
<!--
- Sets max-age for cacheable pages, e.g. static pages.
-->
<cache-mapping url-pattern="/" max-age="5s"/>
<cache-mapping url-pattern="*.gif" max-age="60s"/>
<cache-mapping url-pattern="*.jpg" max-age="60s"/>
<cache-mapping url-pattern="*.png" max-age="60s"/>
<cache-mapping url-pattern="*.css" max-age="60s"/>
<cache-mapping url-pattern="*.js" max-age="60s"/>
<session-config>
<use-persistent-store>${session_store}</use-persistent-store>
<enable-url-rewriting>false</enable-url-rewriting>
</session-config>
</web-app-default>
</host-default>
<!--
<host id="${web_admin_host}" root-directory="${web_admin_host}">
-->
<host-default>
<!--
- Administration application /resin-admin
-->
<resin:if test="${web_admin_enable}">
<web-app id="/resin-admin" root-directory="${resin.root}/doc/admin">
<prologue>
<!-- only allow access from internal IP (10.*,192.168.*,127.*) -->
<resin:set var="resin_admin_external"
value="true"/>
<resin:set var="resin_admin_insecure"
value="true"/>
</prologue>
</web-app>
</resin:if>
<resin:if test="${rest_admin_enable}">
<web-app id="/resin-rest"
root-directory="${resin.root}/doc/resin-rest">
<resin:BasicLogin realm-name="resin"/>
<resin:Allow url-pattern="/*">
<resin:IfUserInRole role="resin-admin"/>
</resin:Allow>
<servlet-mapping url-pattern="/*"
servlet-class="com.caucho.admin.servlet.AdminRestServlet">
<init>
<require-secure>${rest_admin_ssl}</require-secure>
</init>
</servlet-mapping>
</web-app>
</resin:if>
</host-default>
<!-- include resources config files in resources/ -->
<resin:import fileset="${resin.root}/${cluster.id}-inf/**/*.xml"/>
<!-- standard servlet behavior, including .jsp, .php, and WEB-INF -->
<resin:import path="${__DIR__}/app-default.xml"/>
</cluster-default>
</resin>
# resin.properties - configuration variable values
#
# See resin.xml, cluster-default.xml, and health.xml for full configuration.
# Any variable defined by ${...} can be set as a property in this file.
#
# Individual server overrides can be specified by prepending the server.id.
# For example, increasing the log level for an individual server:
#
# log_level : info
# app-0.log_level : finest
#
# Like Resin XML configuration, modification of this file will trigger
# a restart.
#
# General log level (modify resin.xml for more granular log level adjustments)
# log_level : finer
# Enable verbose browser error reporting
dev_mode : true
# How often Resin should check for updated files.
# dependency_check_interval : 5m
# Enable /resin-doc Resin documentation
resin_doc : true
resin_doc_host :
# List Triad server ip-addresses:hmux-port for each tier, space separated
# App tier Triad servers must be listed to enable web-tier to
# app-tier load-balancing
# web-tier Triad servers: web-0 web-1 web-2
# web_servers : 127.0.0.1:6810
# app-tier Triad servers: app-0 app-1 app-2
app_servers : 127.0.0.1:6800
# Configures Resin for a memcached server tier
# memcached-tier Triad servers: memcached-0 memcached-1 memcached-2
# memcached_servers : 127.0.0.1:6820
# memcached_port : 11211
# proxycache tier: proxycache-0 proxycache-1 proxycache-2
# proxycache_servers : 127.0.0.1:6830
# backend_servers : 127.0.0.1:80
# Allow elastic nodes to join the cluster (enable for cloud mode)
# elastic_cloud_enable : true
# The cluster that elastic nodes should join - each will contact a Triad server
# Use a separate resin.properties file for each cluster
home_cluster : app
# Used for an elastic server to join the cluster in home_cluster
# elastic_server : true
# Create a distinct webapps/ directory for each server, for vertical scaling
# elastic_webapp : true
# Used for cloud servers with dynamic IP addresses where the DNS name for the
# server is assigned after the server starts. Resin will retry the start.
# elastic_dns : true
# specifies the --server in the config file
# home_server : app-0
# Set HTTP and HTTPS bind address
# http_address : *
# Set HTTP and HTTPS ports.
# Use overrides for individual server control, for example: app-0.http : 8081
app.http : 8080
app.https : 8443
web.http : 8080
web.https : 8443
# memcached.http : 8080
# memcached.https : 8443
# proxycache.http : 8080
# proxycache.https : 8443
# For security, Resin can switch to a non-root user after binding to port 80
setuid_user :
setuid_group :
# Arg passed directly to the JVM
# jvm_args : -Xmx2048m -XX:MaxPermSize=256m
# jvm_mode : -server
# Local URLs for the watchdog to check to ensure the server is up,
# space separated
# http_ping_urls : http://127.0.0.1/test.jsp
# Throttle the number of active threads for a port
port_thread_max : 256
accept_thread_max : 32
accept_thread_min : 4
# keepalive_max : 512
# Enable JNI TCP speed optimizations
tcp_cork : true
sendfile : true
keepalive_select_enable : true
# OpenSSL certificate configuration
# Keys are typically stored in the resin configuration directory.
# openssl_file : keys/test.crt
# openssl_key : keys/test.key
# openssl_password : changeme
# JSSE certificate configuration
# Keys are typically stored in the resin configuration directory.
# jsse_keystore_type : jks
# jsse_keystore_file : /etc/resin/keys/server.keystore
# jsse_keystore_password : changeme
# In absence of a signed certificate, Resin will fallback to using a
# self-signed development certificate if HTTPS is enabled
# Enable the proxy-cache - for caching static content in memory
proxy_cache_enable : true
# Sets the proxy cache memory size
# proxy_cache_size : 256m
# Enable clustered persistent sessions (for failover)
session_store : true
# disable the quercus *.php mapping when using Apache for PHP
# quercus_disable : true
# Web-apps named with numeric suffixes, e.g. foo-10.0.war and can be browsed
# as /foo. When a new version of the web-app is deployed, Resin continues
# to route active session requests to the previous web-app version while
# new sessions go to the new version, so users will not be aware of the
# application upgrade.
# webapp_multiversion_routing : true
# Set the email address to receive weekly and restart PDF reports
# email : admin@example.com
# Set a global password to prevent foreign Resin instances from connecting.
# Must be identical between web, app, and cache clusters.
# cluster_system_key : changeme
# Enable remote admin (for remote CLI and for EC2 ext: triad discovery)
remote_admin_enable : true
# Enable /resin-admin web administration console
web_admin_enable : true
web_admin_host :
# Permit access to /resin-admin from non-local network ip-addresses
# web_admin_external : true
# Require HTTPS to access /resin-admin
# web_admin_ssl : true
# Enable Resin REST Admin
# rest_admin_enable : true
# Require SSL for REST Admin
# rest_admin_ssl : true
# Access to /resin-admin and remote CLI is password restricted.
# Use "resinctl generate-password" and copy/paste here to set the admin
# admin_user : admin
# admin_password : {SSHA}xxxxxxxx
# Enable reading EC2 user data as resin properties
# properties_import_url : http://169.254.169.254/latest/user-data
admin_user : admin
admin_password : {plain}password
remote_cli_enable : true
#! /bin/sh
#
# See contrib/init.resin for /etc/rc.d/init.d startup script
#
# resin.sh -- execs resin in the foreground
# resin.sh start -- starts resin in the background
# resin.sh stop -- stops resin
# resin.sh restart -- restarts resin
#
# resin.sh will return a status code if the wrapper detects an error, but
# some errors, like bind exceptions or Java errors, are not detected.
#
# To install, you'll need to configure JAVA_HOME and RESIN_HOME and
# copy contrib/init.resin to /etc/rc.d/init.d/resin. Then
# use "unix# /sbin/chkconfig resin on"
if test -n "${JAVA_HOME}"; then
if test -z "${JAVA_EXE}"; then
JAVA_EXE=$JAVA_HOME/bin/java
fi
fi
if test -z "${JAVA_EXE}"; then
JAVA_EXE=java
fi
#
# trace script and simlinks to find the wrapper
#
if test -z "${RESIN_HOME}"; then
script=`/bin/ls -l $0 | awk '{ print $NF; }'`
while test -h "$script"
do
script=`/bin/ls -l $script | awk '{ print $NF; }'`
done
bin=`dirname $script`
RESIN_HOME="$bin/.."
fi
if test -n "${RESIN_HOME}"; then
cd "${RESIN_HOME}"
fi
#echo ${IPG_ENV_PARAMS}
IPG_ENV_PARAMS_DELIM=`echo $IPG_ENV_PARAMS | awk '{gsub(/#/," ");print}'`
echo "params are: " ${IPG_ENV_PARAMS_DELIM}
exec $JAVA_EXE -jar ${IPG_ENV_PARAMS_DELIM} ${RESIN_HOME}/lib/resin.jar $*
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
- Resin 4.0 configuration file.
--><resin xmlns="http://caucho.com/ns/resin" xmlns:resin="urn:java:com.caucho.resin">
<!-- property-based Resin configuration -->
<resin:properties optional="true" path="${__DIR__}/resin.properties"/>
<resin:if test="${properties_import_url}">
<resin:properties optional="true" path="${properties_import_url}" recover="true"/>
</resin:if>
<!-- Logging configuration for the JDK logging API -->
<log-handler format=" {${thread}} ${log.message}" level="all" name="" path="stdout:" timestamp="[%y-%m-%d %H:%M:%S.%s]"/>
<!--
- Alternative pseudo-TTCC log format
-
- <log-handler name="" level="all" path="stdout:"
- timestamp="%y-%m-%d %H:%M:%S.%s"
- format=" [${thread}] ${log.level} ${log.shortName} - ${log.message}"/>
-->
<!--
- level='info' for production
- 'fine' or 'finer' for development and troubleshooting
-->
<logger level="${log_level?:'info'}" name=""/>
<logger level="config" name="com.caucho.java"/>
<logger level="config" name="com.caucho.loader"/>
<!--
- Default configuration applied to all clusters, including
- HTTP, HTTPS, and /resin-admin configuration.
-->
<resin:import path="${__DIR__}/cluster-default.xml"/>
<!--
- health configuration
-->
<resin:import path="${__DIR__}/health.xml"/>
<!--
- Remote management requires at least one enabled admin user.
-->
<resin:AdminAuthenticator>
<user name="${admin_user}" password="${admin_password}"/>
<resin:import optional="true" path="${__DIR__}/admin-users.xml"/>
</resin:AdminAuthenticator>
<!--
- For clustered systems, create a password in as cluster_system_key
-->
<cluster-system-key>${cluster_system_key}</cluster-system-key>
<!--
- For production sites, change dependency-check-interval to something
- like 600s, so it only checks for updates every 10 minutes.
-->
<dependency-check-interval>-1</dependency-check-interval>
<!-- For resin.properties dynamic cluster joining -->
<home-cluster>${home_cluster}</home-cluster>
<home-server>${home_server}</home-server>
<elastic-server>${elastic_server}</elastic-server>
<elastic-dns>${elastic_dns}</elastic-dns>
<!--
- Configures the main application cluster. Load-balancing configurations
- will also have a web cluster.
-->
<cluster id="app">
<!-- define the servers in the cluster -->
<server-multi address-list="${app_servers}" id-prefix="app-" port="6800"/>
<host-default>
<!-- creates the webapps directory for .war expansion -->
<dependency-check-interval>2s</dependency-check-interval>
<web-app-deploy expand-preserve-fileset="WEB-INF/work/**" multiversion-routing="${webapp_multiversion_routing}" path="webapps" path-suffix="${elastic_webapp?resin.id:''}" startup-mode="lazy"/>
</host-default>
<!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
<host-deploy path="hosts">
<host-default>
<resin:import optional="true" path="host.xml"/>
</host-default>
</host-deploy>
<!-- the default host, matching any host name -->
<host id="" root-directory=".">
<!--
- webapps can be overridden/extended in the resin.xml
-->
</host>
<resin:if test="${resin_doc}">
<host id="${resin_doc_host}" root-directory="${resin_doc_host}">
<web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
</host>
</resin:if>
</cluster>
<cluster id="web">
<!-- define the servers in the cluster -->
<server-multi address-list="${web_servers}" id-prefix="web-" port="6810"/>
<host id="" root-directory="web">
<web-app id="/async">
<resin:LoadBalance cluster="app" regexp=""/>
</web-app>
</host>
</cluster>
<cluster xmlns:memcache="urn:java:com.caucho.memcached" id="memcached">
<!-- define the servers in the cluster -->
<server-multi address-list="${memcached_servers}" id-prefix="memcached-" port="6820">
<!-- listen for the memcache protocol -->
<listen keepalive-timeout="600s" port="${memcached_port?:11211}" socket-timeout="600s">
<memcache:MemcachedProtocol/>
</listen>
</server-multi>
</cluster>
<cluster id="proxycache">
<!-- define the servers in the cluster -->
<server-multi address-list="${proxycache_servers}" id-prefix="proxycache-" port="6830"/>
<host id="" root-directory="proxycache">
</host>
</cluster>
<class-loader>
<tree-loader path="${resin.home}/resin-inf"/>
</class-loader>
<database jndi-name="jdbc/mcz">
<driver type="com.mysql.jdbc.Driver">
<url>jdbc:mysql://localhost:3306/mcz</url>
<user>root</user>
<password>giptmgr</password>
</driver>
</database>
</resin>
\ No newline at end of file
# BASIC UBUNTU IMAGE FOR GALLERY APPS
# this image contains all needed packages
# for running mcz/srg/arg/etc...
# Format: FROM repository[:version]
FROM 172.16.1.5:5000/amir/base-server-no-db
# Format: MAINTAINER Name <email@addr.ess>
MAINTAINER DevOps <devops@ipgallery.com>
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root
## MYSQL ###########
COPY ./src /src
RUN apt-get update && \
apt-get -yq install mysql-server pwgen && \
rm -rf /var/lib/apt/lists/*
# Remove pre-installed database
RUN rm -rf /var/lib/mysql/*
# Remove syslog configuration
RUN rm /etc/mysql/conf.d/mysqld_safe_syslog.cnf
# Add MySQL configuration
ADD src/my.cnf /etc/mysql/conf.d/my.cnf
ADD src/mysqld_charset.cnf /etc/mysql/conf.d/mysqld_charset.cnf
# Add MySQL scripts
ADD src/import_sql.sh /import_sql.sh
ADD src/run.sh /run.sh
RUN chmod 755 /*.sh
# Exposed ENV
ENV MYSQL_USER admin
ENV MYSQL_PASS **Random**
# Replication ENV
ENV REPLICATION_MASTER **False**
ENV REPLICATION_SLAVE **False**
ENV REPLICATION_USER replica
ENV REPLICATION_PASS replica
# Add VOLUMEs to allow backup of config and databases
VOLUME ["/etc/mysql", "/var/lib/mysql"]
EXPOSE 3306
##############
## MONGO DB ##
RUN src/mongo-install.sh
# conf file
ADD src/mongod.conf /etc/mongod.conf
ENV LC_ALL C
EXPOSE 27017
EXPOSE 28017
VOLUME ["/data"]
###############
CMD ["/run.sh"]
#!/bin/bash
if [[ $# -ne 3 ]]; then
echo "Usage: $0 <username> <password> </path/to/sql_file.sql>"
exit 1
fi
echo "=> Starting MySQL Server"
/usr/bin/mysqld_safe > /dev/null 2>&1 &
PID=$!
RET=1
while [[ RET -ne 0 ]]; do
echo "=> Waiting for confirmation of MySQL service startup"
sleep 5
mysql -u"$1" -p"$2" -e "status" > /dev/null 2>&1
RET=$?
done
echo " Started with PID ${PID}"
echo "=> Importing SQL file"
mysql -u"$1" -p"$2" < "$3"
echo "=> Stopping MySQL Server"
mysqladmin -u"$1" -p"$2" shutdown
echo "=> Done!"
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
# create list
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
# update
apt-get update
#install
apt-get install -y --force-yes mongodb-org
service mongod stop
# clean
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
\ No newline at end of file
# mongod.conf
# Where to store the data.
# Note: if you run mongodb as a non-root user (recommended) you may
# need to create and set permissions for this directory manually,
# e.g., if the parent directory isn't mutable by the mongodb user.
dbpath=/data/db
#where to log
logpath=/var/log/mongodb/mongod.log
logappend=true
#port = 27017
# Listen to local interface only. Comment out to listen on all interfaces.
#bind_ip = 172.16.1.244
#bind_ip = 127.0.0.1
# Disables write-ahead journaling
# nojournal = true
# Enables periodic logging of CPU utilization and I/O wait
#cpu = true
# Turn on/off security. Off is currently the default
noauth = true
#auth = true
# Verbose logging output.
#verbose = true
# Inspect all client data for validity on receipt (useful for
# developing drivers)
#objcheck = true
# Enable db quota management
#quota = true
# Set oplogging level where n is
# 0=off (default)
# 1=W
# 2=R
# 3=both
# 7=W+some reads
#diaglog = 0
# Ignore query hints
#nohints = true
# Disable the HTTP interface (Defaults to localhost:28017).
#nohttpinterface = true
# Turns off server-side scripting. This will result in greatly limited
# functionality
#noscripting = true
# Turns off table scans. Any query that would do a table scan fails.
#notablescan = true
# Disable data file preallocation.
#noprealloc = true
# Specify .ns file size for new databases.
# nssize = <size>
# Replication Options
# in replicated mongo databases, specify the replica set name here
#replSet=rs0
# maximum size in megabytes for replication operation log
oplogSize=1024
# path to a key file storing authentication info for connections
# between replica set members
#keyFile=/path/to/keyfile
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
skip_name_resolve
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
max_connections = 5000
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
[mysqld]
character_set_server=utf8
character_set_filesystem=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
init_connect='SET collation_connection = utf8_general_ci'
skip-character-set-client-handshake
\ No newline at end of file
#!/bin/bash
# start ssh
/usr/sbin/sshd -D &
# start mongo
mkdir /data/db
export LC_ALL=C
/usr/bin/mongod --config /etc/mongod.conf &
VOLUME_HOME="/var/lib/mysql"
CONF_FILE="/etc/mysql/conf.d/my.cnf"
LOG="/var/log/mysql/error.log"
# Set permission of config file
chmod 644 ${CONF_FILE}
chmod 644 /etc/mysql/conf.d/mysqld_charset.cnf
StartMySQL ()
{
/usr/bin/mysqld_safe > /dev/null 2>&1 &
# Time out in 1 minute
LOOP_LIMIT=13
for (( i=0 ; ; i++ )); do
if [ ${i} -eq ${LOOP_LIMIT} ]; then
echo "Time out. Error log is shown as below:"
tail -n 100 ${LOG}
exit 1
fi
echo "=> Waiting for confirmation of MySQL service startup, trying ${i}/${LOOP_LIMIT} ..."
sleep 5
mysql -uroot -e "status" > /dev/null 2>&1 && break
done
}
CreateMySQLUser()
{
StartMySQL
if [ "$MYSQL_PASS" = "**Random**" ]; then
unset MYSQL_PASS
fi
PASS=${MYSQL_PASS:-$(pwgen -s 12 1)}
_word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" )
echo "=> Creating MySQL user ${MYSQL_USER} with ${_word} password"
mysql -uroot -e "CREATE USER '${MYSQL_USER}'@'%' IDENTIFIED BY '$PASS'"
mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO '${MYSQL_USER}'@'%' WITH GRANT OPTION"
echo "=> Done!"
echo "========================================================================"
echo "You can now connect to this MySQL Server using:"
echo ""
echo " mysql -u$MYSQL_USER -p$PASS -h<host> -P<port>"
echo ""
echo "Please remember to change the above password as soon as possible!"
echo "MySQL user 'root' has no password but only allows local connections"
echo "========================================================================"
mysqladmin -uroot shutdown
}
ImportSql()
{
StartMySQL
for FILE in ${STARTUP_SQL}; do
echo "=> Importing SQL file ${FILE}"
mysql -uroot < "${FILE}"
done
mysqladmin -uroot shutdown
}
# Main
if [ ${REPLICATION_MASTER} == "**False**" ]; then
unset REPLICATION_MASTER
fi
if [ ${REPLICATION_SLAVE} == "**False**" ]; then
unset REPLICATION_SLAVE
fi
# Initialize empty data volume and create MySQL user
if [[ ! -d $VOLUME_HOME/mysql ]]; then
echo "=> An empty or uninitialized MySQL volume is detected in $VOLUME_HOME"
echo "=> Installing MySQL ..."
if [ ! -f /usr/share/mysql/my-default.cnf ] ; then
cp /etc/mysql/my.cnf /usr/share/mysql/my-default.cnf
fi
mysql_install_db > /dev/null 2>&1
echo "=> Done!"
echo "=> Creating admin user ..."
CreateMySQLUser
else
echo "=> Using an existing volume of MySQL"
fi
# Import Startup SQL
if [ -n "${STARTUP_SQL}" ]; then
if [ ! -f /sql_imported ]; then
echo "=> Initializing DB with ${STARTUP_SQL}"
ImportSql
touch /sql_imported
fi
fi
# Set MySQL REPLICATION - MASTER
if [ -n "${REPLICATION_MASTER}" ]; then
echo "=> Configuring MySQL replication as master ..."
if [ ! -f /replication_configured ]; then
RAND="$(date +%s | rev | cut -c 1-2)$(echo ${RANDOM})"
echo "=> Writting configuration file '${CONF_FILE}' with server-id=${RAND}"
sed -i "s/^#server-id.*/server-id = ${RAND}/" ${CONF_FILE}
sed -i "s/^#log-bin.*/log-bin = mysql-bin/" ${CONF_FILE}
echo "=> Starting MySQL ..."
StartMySQL
echo "=> Creating a log user ${REPLICATION_USER}:${REPLICATION_PASS}"
mysql -uroot -e "CREATE USER '${REPLICATION_USER}'@'%' IDENTIFIED BY '${REPLICATION_PASS}'"
mysql -uroot -e "GRANT REPLICATION SLAVE ON *.* TO '${REPLICATION_USER}'@'%'"
echo "=> Done!"
mysqladmin -uroot shutdown
touch /replication_configured
else
echo "=> MySQL replication master already configured, skip"
fi
fi
# Set MySQL REPLICATION - SLAVE
if [ -n "${REPLICATION_SLAVE}" ]; then
echo "=> Configuring MySQL replication as slave ..."
if [ -n "${MYSQL_PORT_3306_TCP_ADDR}" ] && [ -n "${MYSQL_PORT_3306_TCP_PORT}" ]; then
if [ ! -f /replication_configured ]; then
RAND="$(date +%s | rev | cut -c 1-2)$(echo ${RANDOM})"
echo "=> Writting configuration file '${CONF_FILE}' with server-id=${RAND}"
sed -i "s/^#server-id.*/server-id = ${RAND}/" ${CONF_FILE}
sed -i "s/^#log-bin.*/log-bin = mysql-bin/" ${CONF_FILE}
echo "=> Starting MySQL ..."
StartMySQL
echo "=> Setting master connection info on slave"
mysql -uroot -e "CHANGE MASTER TO MASTER_HOST='${MYSQL_PORT_3306_TCP_ADDR}',MASTER_USER='${MYSQL_ENV_REPLICATION_USER}',MASTER_PASSWORD='${MYSQL_ENV_REPLICATION_PASS}',MASTER_PORT=${MYSQL_PORT_3306_TCP_PORT}, MASTER_CONNECT_RETRY=30"
echo "=> Done!"
mysqladmin -uroot shutdown
touch /replication_configured
else
echo "=> MySQL replicaiton slave already configured, skip"
fi
else
echo "=> Cannot configure slave, please link it to another MySQL container with alias as 'mysql'"
exit 1
fi
fi
tail -F $LOG &
exec mysqld_safe
sudo docker run -p 3316:3306 -p 28117:28017 -p 27117:27017 -v /data/mongo:/data -e MYSQL_PASS="giptmgr" 172.16.1.5:5000/amir/base-server-db
# BASIC UBUNTU IMAGE FOR GALLERY APPS
# this image contains all needed packages
# for running mcz/srg/arg/etc...
# Format: FROM repository[:version]
FROM ubuntu:latest
# Format: MAINTAINER Name <email@addr.ess>
MAINTAINER DevOps <devops@ipgallery.com>
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root
COPY ./src /src
# updating
RUN apt-get update
# yeh , lets start installing
RUN src/install_packages.sh
# enable ssh and set root password : giptmgr
RUN mkdir /var/run/sshd
RUN echo 'root:giptmgr' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
EXPOSE 22
EXPOSE 80
CMD ["/usr/sbin/sshd", "-D"]
#!/bin/bash
INST_DIR=/tmp
##########################################################################
# FUNCTION: config_apt
# PURPOSE: add local repository to apt configuration file
# PARAMETERS: None
##########################################################################
config_apt()
{
ENTRY=`grep $1 /etc/apt/sources.list`
if [ "$ENTRY" != "" ]; then
return;
fi
echo "deb file:$1 /" >> /etc/apt/sources.list
apt-get update
if [ $? != 0 ] ; then
echo "Error: Failed to update apt source list. Exiting !!!"
exit -1;
fi
echo "$1 added successfully to apt source list"
}
##########################################################################
# FUNCTION: aptinst
# PURPOSE: install a given package
# PARAMETERS: $1 - package name
##########################################################################
aptinst()
{
echo "-------------- Installing: $1"
apt-get --assume-yes --force-yes -o Dpkg::Options::="--force-confold" install $1
if [ $? != 0 ] ; then
echo "Error: Failed to install: $1. Exiting !!!"
exit -2;
fi
}
##########################################################################
# FUNCTION: aptupdate
# PURPOSE: update apt with the modifications in sources.list
# PARAMETERS: none
##########################################################################
aptupdate()
{
echo "-------------- updating sources.list"
apt-get update
if [ $? != 0 ] ; then
echo "Error: Failed to update sources.list !!!"
exit -2;
fi
}
##########################################################################
# MAIN - Start Running
##########################################################################
cd $INST_DIR
echo "Starting common install script ..."
#install base packages
#aptinst synaptic
aptinst tcsh
aptinst ssh
aptinst telnet
aptinst telnetd
aptinst ftp
aptinst ftpd
aptinst ksh
# install java related packages
aptinst default-jdk
# install subversion components
#aptinst subversion
#aptinst subversion-tools
# install apache
aptinst apache2
#install MySQL client & server
#aptinst mysql-server
#aptinst mysql-client
aptinst rabbitmq-server
#aptinst mysql-workbench
# install redis
aptinst redis-server
# install tool packages
#aptinst svn-workbench
#aptinst wireshark
#aptinst emacs
aptinst ant
aptinst ddd
#aptinst phpMyAdmin
aptinst bind9
#aptinst libcurl4-openssl-dev
aptinst tshark
aptinst ntp
#aptinst ffmpeg
aptinst gksu
# install C/C++ related packages
aptinst build-essential
aptinst g++-4.4
aptinst gcc-4.4
aptinst libncurses5
#aptinst libncurses5-dev
aptinst libncurses5-dbg
aptinst libxml2
#aptinst libxml2-dev
aptinst libxml2-dbg
#aptinst libxml2-doc
#aptinst gsoap
aptinst libtool
#####aptinst liblua5.1-0
#####aptinst liblua5.1-0-dev
#####aptinst liblua5.1-md5-0
#####aptinst liblua5.1-md5-dev
#aptinst libmcrypt-dev
aptinst libmcrypt4
#aptinst libgcrypt-dev
#aptinst libgnutls-dev
aptinst libmhash2
#aptinst libmhash-dev
#aptinst libmysqlclient-dev
#aptinst libmysqlclient18
aptinst scons
aptinst libhiredis0.10
#aptinst libhiredis-dev
aptinst libfcgi-dev
aptinst spawn-fcgi
#install lighttpd
aptinst wget
# install MCZ related packages
aptinst node
aptinst nodejs
# remove packages from cache
rm -rf /var/lib/apt/lists/*
echo "Installtion completed successfully"
# BASIC UBUNTU IMAGE FOR GALLERY APPS
# this image contains all needed packages
# for running mcz/srg/arg/etc...
# Format: FROM repository[:version]
FROM 172.16.1.5:5000/amir/base-server-no-db
# Format: MAINTAINER Name <email@addr.ess>
MAINTAINER DevOps <devops@ipgallery.com>
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root
COPY ./src /src
# updating
#RUN apt-get update
# yeh , lets start installing
RUN dpkg -i src/resin_4.0.43-amd64.deb
ADD src/resin.properties /etc/resin/
ADD src/cluster-default.xml /etc/resin/
EXPOSE 8080
EXPOSE 8443
EXPOSE 9080
ENTRYPOINT ["src/start-resin.sh"]
CMD ["start"]
\ No newline at end of file
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="urn:java:com.caucho.resin">
<!--
- default configuration applied to all clusters
-->
<cluster-default>
<!-- shared webapp jars for non-classloader-aware libraries -->
<web-app-default>
<class-loader>
<library-loader path="${resin.root}/webapp-jars"/>
<library-loader path="${resin.root}/webapp.d/lib"/>
<library-loader path="config:/webapp.d/lib"/>
</class-loader>
</web-app-default>
<!-- shared jars and drivers for the app-tier -->
<class-loader>
<tree-loader path="${resin.root}/${cluster.id}-inf"/>
</class-loader>
<!-- enables development error pages -->
<resin:if test="${dev_mode}">
<development-mode-error-page/>
</resin:if>
<!--
- Enables the proxy cache (available in Resin Professional)
-->
<resin:if test="${proxy_cache_enable}">
<proxy-cache memory-size="${proxy_cache_size}">
<!-- Vary header rewriting for IE -->
<rewrite-vary-as-private/>
</proxy-cache>
</resin:if>
<!--
- Admin services
-->
<resin:if test="${remote_admin_enable}">
<resin:RemoteAdminService/>
</resin:if>
<resin:AdminServices/>
<resin:if test="${elastic_cloud_enable}">
<resin:ElasticCloudService/>
</resin:if>
<!-- defaults for each server, i.e. JVM -->
<server-default>
<jvm-arg-line>${jvm_args}</jvm-arg-line>
<jvm-mode>${jvm_mode}</jvm-mode>
<!--
- If starting Resin as root on Unix, specify the user name
- and group name for the web server user.
-->
<user-name>${setuid_user}</user-name>
<group-name>${setuid_group}</group-name>
<port-default>
<port-thread-max>${port_thread_max}</port-thread-max>
<accept-thread-min>${accept_thread_min}</accept-thread-min>
<accept-thread-max>${accept_thread_max}</accept-thread-max>
<keepalive-max>${keepalive_max?:-1}</keepalive-max>
<tcp-cork>${tcp_cork}</tcp-cork>
</port-default>
<sendfile-enable>${sendfile}</sendfile-enable>
<keepalive-select-enable>${keepalive_select_enable}</keepalive-select-enable>
<!-- The http port -->
<http address="${http_address?:'*'}" port="${http}"/>
<!-- SSL port configuration: -->
<resin:choose>
<resin:when test="${openssl_file != null}">
<http address="${http_address?:'*'}" port="${https}">
<openssl>
<certificate-file>${file_lookup(openssl_file,__DIR__)}</certificate-file>
<certificate-key-file>${file_lookup(openssl_key, __DIR__)}</certificate-key-file>
<password>
<resin:Password>${openssl_password}</resin:Password>
</password>
</openssl>
</http>
</resin:when>
<resin:when test="${jsse_keystore_file != null}">
<http address="${http_address?:'*'}" port="${https}">
<jsse-ssl>
<key-store-type>${jsse_keystore_type?:'jks'}</key-store-type>
<key-store-file>${jsse_keystore_file}</key-store-file>
<password>
<resin:Password>${jsse_keystore_password}</resin:Password>
</password>
</jsse-ssl>
</http>
</resin:when>
<resin:when test="${class_exists('sun.security.x509.CertAndKeyGen')}">
<http address="${http_address?:'*'}" port="${https}">
<jsse-ssl self-signed-certificate-name="resin@localhost"/>
</http>
</resin:when>
</resin:choose>
</server-default>
<!--
- Default host configuration applied to all virtual hosts.
-->
<host-default>
<access-log path="log/access.log"
format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
rollover-period="1W"/>
<!--
- Defaults applied to each web-app.
-->
<web-app-default>
<prologue>
<allow-servlet-el/>
</prologue>
<!--
- Sets max-age for cacheable pages, e.g. static pages.
-->
<cache-mapping url-pattern="/" max-age="5s"/>
<cache-mapping url-pattern="*.gif" max-age="60s"/>
<cache-mapping url-pattern="*.jpg" max-age="60s"/>
<cache-mapping url-pattern="*.png" max-age="60s"/>
<cache-mapping url-pattern="*.css" max-age="60s"/>
<cache-mapping url-pattern="*.js" max-age="60s"/>
<session-config>
<use-persistent-store>${session_store}</use-persistent-store>
<enable-url-rewriting>false</enable-url-rewriting>
</session-config>
</web-app-default>
</host-default>
<!--
<host id="${web_admin_host}" root-directory="${web_admin_host}">
-->
<host-default>
<!--
- Administration application /resin-admin
-->
<resin:if test="${web_admin_enable}">
<web-app id="/resin-admin" root-directory="${resin.root}/doc/admin">
<prologue>
<!-- only allow access from internal IP (10.*,192.168.*,127.*) -->
<resin:set var="resin_admin_external"
value="true"/>
<resin:set var="resin_admin_insecure"
value="true"/>
</prologue>
</web-app>
</resin:if>
<resin:if test="${rest_admin_enable}">
<web-app id="/resin-rest"
root-directory="${resin.root}/doc/resin-rest">
<resin:BasicLogin realm-name="resin"/>
<resin:Allow url-pattern="/*">
<resin:IfUserInRole role="resin-admin"/>
</resin:Allow>
<servlet-mapping url-pattern="/*"
servlet-class="com.caucho.admin.servlet.AdminRestServlet">
<init>
<require-secure>${rest_admin_ssl}</require-secure>
</init>
</servlet-mapping>
</web-app>
</resin:if>
</host-default>
<!-- include resources config files in resources/ -->
<resin:import fileset="${resin.root}/${cluster.id}-inf/**/*.xml"/>
<!-- standard servlet behavior, including .jsp, .php, and WEB-INF -->
<resin:import path="${__DIR__}/app-default.xml"/>
</cluster-default>
</resin>
./start-resin.sh start
./start-resin.sh stop
\ No newline at end of file
# resin.properties - configuration variable values
#
# See resin.xml, cluster-default.xml, and health.xml for full configuration.
# Any variable defined by ${...} can be set as a property in this file.
#
# Individual server overrides can be specified by prepending the server.id.
# For example, increasing the log level for an individual server:
#
# log_level : info
# app-0.log_level : finest
#
# Like Resin XML configuration, modification of this file will trigger
# a restart.
#
# General log level (modify resin.xml for more granular log level adjustments)
# log_level : finer
# Enable verbose browser error reporting
dev_mode : true
# How often Resin should check for updated files.
# dependency_check_interval : 5m
# Enable /resin-doc Resin documentation
resin_doc : true
resin_doc_host :
# List Triad server ip-addresses:hmux-port for each tier, space separated
# App tier Triad servers must be listed to enable web-tier to
# app-tier load-balancing
# web-tier Triad servers: web-0 web-1 web-2
# web_servers : 127.0.0.1:6810
# app-tier Triad servers: app-0 app-1 app-2
app_servers : 127.0.0.1:6800
# Configures Resin for a memcached server tier
# memcached-tier Triad servers: memcached-0 memcached-1 memcached-2
# memcached_servers : 127.0.0.1:6820
# memcached_port : 11211
# proxycache tier: proxycache-0 proxycache-1 proxycache-2
# proxycache_servers : 127.0.0.1:6830
# backend_servers : 127.0.0.1:80
# Allow elastic nodes to join the cluster (enable for cloud mode)
# elastic_cloud_enable : true
# The cluster that elastic nodes should join - each will contact a Triad server
# Use a separate resin.properties file for each cluster
home_cluster : app
# Used for an elastic server to join the cluster in home_cluster
# elastic_server : true
# Create a distinct webapps/ directory for each server, for vertical scaling
# elastic_webapp : true
# Used for cloud servers with dynamic IP addresses where the DNS name for the
# server is assigned after the server starts. Resin will retry the start.
# elastic_dns : true
# specifies the --server in the config file
# home_server : app-0
# Set HTTP and HTTPS bind address
# http_address : *
# Set HTTP and HTTPS ports.
# Use overrides for individual server control, for example: app-0.http : 8081
app.http : 8080
app.https : 8443
web.http : 8080
web.https : 8443
# memcached.http : 8080
# memcached.https : 8443
# proxycache.http : 8080
# proxycache.https : 8443
# For security, Resin can switch to a non-root user after binding to port 80
setuid_user :
setuid_group :
# Arg passed directly to the JVM
# jvm_args : -Xmx2048m -XX:MaxPermSize=256m
# jvm_mode : -server
# Local URLs for the watchdog to check to ensure the server is up,
# space separated
# http_ping_urls : http://127.0.0.1/test.jsp
# Throttle the number of active threads for a port
port_thread_max : 256
accept_thread_max : 32
accept_thread_min : 4
# keepalive_max : 512
# Enable JNI TCP speed optimizations
tcp_cork : true
sendfile : true
keepalive_select_enable : true
# OpenSSL certificate configuration
# Keys are typically stored in the resin configuration directory.
# openssl_file : keys/test.crt
# openssl_key : keys/test.key
# openssl_password : changeme
# JSSE certificate configuration
# Keys are typically stored in the resin configuration directory.
# jsse_keystore_type : jks
# jsse_keystore_file : /etc/resin/keys/server.keystore
# jsse_keystore_password : changeme
# In absence of a signed certificate, Resin will fallback to using a
# self-signed development certificate if HTTPS is enabled
# Enable the proxy-cache - for caching static content in memory
proxy_cache_enable : true
# Sets the proxy cache memory size
# proxy_cache_size : 256m
# Enable clustered persistent sessions (for failover)
session_store : true
# disable the quercus *.php mapping when using Apache for PHP
# quercus_disable : true
# Web-apps named with numeric suffixes, e.g. foo-10.0.war and can be browsed
# as /foo. When a new version of the web-app is deployed, Resin continues
# to route active session requests to the previous web-app version while
# new sessions go to the new version, so users will not be aware of the
# application upgrade.
# webapp_multiversion_routing : true
# Set the email address to receive weekly and restart PDF reports
# email : admin@example.com
# Set a global password to prevent foreign Resin instances from connecting.
# Must be identical between web, app, and cache clusters.
# cluster_system_key : changeme
# Enable remote admin (for remote CLI and for EC2 ext: triad discovery)
remote_admin_enable : true
# Enable /resin-admin web administration console
web_admin_enable : true
web_admin_host :
# Permit access to /resin-admin from non-local network ip-addresses
# web_admin_external : true
# Require HTTPS to access /resin-admin
# web_admin_ssl : true
# Enable Resin REST Admin
# rest_admin_enable : true
# Require SSL for REST Admin
# rest_admin_ssl : true
# Access to /resin-admin and remote CLI is password restricted.
# Use "resinctl generate-password" and copy/paste here to set the admin
# admin_user : admin
# admin_password : {SSHA}xxxxxxxx
# Enable reading EC2 user data as resin properties
# properties_import_url : http://169.254.169.254/latest/user-data
admin_user : admin
admin_password : {plain}password
remote_cli_enable : true
The file could not be displayed because it is too large.
#!/bin/sh
JAVA_HOME=/usr/bin/java
RESIN_HOME=/usr/local/share/resin-4.0.43/
RESIN_ROOT=/var/resin
java=/usr/bin/java
export JAVA_HOME
export RESIN_HOME
export RESIN_ROOT
#MYARGS= -Xmn512M -Xms1024M -Xss512m -Xmx2048m -server -XX:MaxPermSize=512m -Dds.ip=172.16.1.71:9001 -Dmclogic.sip.ip=172.16.1.72:5076 -Dmclogic.ip=172.16.1.70:8001 -Dmcpresence.ip=172.16.1.71:9001 -Dmcpresence.sip.ip=172.16.1.71:5070 -Dmcweb.ip=172.16.1.70:7001 -DconfigFile.location=/root/bea5/user_projects/domains/commLogic/config
export MYARGS
java -jar -Xmn512M -Xms1024M -Xss512m -Xmx2048m -server -XX:MaxPermSize=512m -Dds.ip=$DS_IP -DconfigFile.location=/opt/config/config.properties \
$RESIN_HOME/lib/resin.jar \
-Xdebug -Xrunjdwp:transport=dt_socket,address=9080,server=y,suspend=n \
-root-directory $RESIN_ROOT \
-conf /etc/resin/resin.xml \
-server app-0 \
$* \
# continue script avoid exit container on docker
while true; do sleep 5; done
sudo docker run -p 8030:8080 \
-p 8033:8443 \
-p 9080:9080 \
--privileged \
-v /opt/config:/opt/config \
-v /opt/mcz/webapps:/var/resin/webapps \
-e DS_IP=172.16.1.42:9001 \
172.16.1.5:5000/amir/base-server-ui
\ No newline at end of file
From ubuntu
RUN apt-get update && apt-get install -y wget
#install docker
RUN wget -qO- https://get.docker.com/ | sed 's/lxc-docker/lxc-docker-1.8.1/' | sh
#install python, pip, setuptools
RUN apt-get install -y python-pip && wget https://bootstrap.pypa.io/ez_setup.py -O -| python
#install ice
RUN wget https://static-ice.ng.bluemix.net/icecli-3.0.zip && pip install icecli-3.0.zip
#install cf
RUN wget "https://cli.run.pivotal.io/stable?release=linux64-binary&version=6.11.3&source=github-rel" --output-document=cf.tgz && tar -xvf cf.tgz && mv cf /usr/bin/cf
BLUEMIX:
sudo docker run --privileged -it -v [path to project location]:[loction inside] 172.16.1.5:5000/bluemix_cli:v1
e.g:
sudo docker run --privileged -it -v /home/amir/svn/PushServer:/PushServer 172.16.1.5:5000/bluemix_cli:v1
export DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443
export DOCKER_CERT_PATH=//.ice/certs
export DOCKER_TLS_VERIFY=1
service docker start
cf login
API endpoint> api.ng.bluemix.net
Email> support@ipgallery.com
Password> giptmgrr
cf ic login
[build - assume Dockerfile is in .]
docker build -t image_name .
- the build should also push the image
[run]
You can create a container from this image in the Bluemix Catalog, or with the following command:
cf ic run --name container_name registry.ng.bluemix.net/ipgallery/image_name:image_tag
[exit]
cf ic logout
cf logout
exit
DOCKER COMMANDS
[run shell on container]
sudo docker run -i -t ubuntu /bin/bash
[inspect container]
sudo docker inspect ubuntu
[running with external port - can be reached from other host]
docker run -p 127.0.0.1:443:3444 -d <docker-image-name>
[running and adding host in /etc/hosts]
sudo docker run --add-host scscf4.open-ims.test:127.0.0.1 <docker-image-name>
[]
sudo ./run-qnib-elk.sh
supervisor_daemonize.sh
..
exit [to exit]
[ push to local registry]
sudo docker build -t [image-name] .
docker tag [image-id] 172.16.1.5:5000/[image-name]
docker push 172.16.1.5:5000/[image-name]
[ delete instances by grep ]
sudo docker rm `sudo docker ps -a | grep [expression] | awk '{print $1}'`
[delete images by grep]
sudo docker rmi `sudo docker images | grep [exp] | awk '{print $3}'`
[pushing/pulling from private registry]
# myusername - ipgallery
sudo docker login
# After that, build the image
sudo docker build -t myusername/myimagename .
# push the image online
docker push myusername/myimagename
[using local registry]
start docker deamon:
- sudo service docker stop
- sudo docker -d --insecure-registry 172.16.1.5:5000 &
search:
- https://172.16.1.5:5000/v2/_catalog
[ if /etc/default/docker have no affect]
sudo docker -d --insecure-registry 172.16.1.5:5000 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock &
\ No newline at end of file
FROM node:latest
#FROM cpswan/node-red
MAINTAINER amir@ipgallery
# install node-red
RUN npm install -g node-red
# expose port
EXPOSE 1880
# install node-red extra packages
#RUN npm install -g mongod
#RUN npm install -g redis
RUN npm install -g node-red-contrib-async
RUN npm install -g node-red-node-redis
RUN npm install -g node-red-node-mongodb
#ADD settings.js /root/.node-red/settings.js
CMD ["/usr/local/bin/node-red","-v"]
/**
* Copyright 2013, 2015 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
// The `https` setting requires the `fs` module. Uncomment the following
// to make it available:
//var fs = require("fs");
module.exports = {
// the tcp port that the Node-RED web server is listening on
uiPort: 1880,
// By default, the Node-RED UI accepts connections on all IPv4 interfaces.
// The following property can be used to listen on a specific interface. For
// example, the following would only allow connections from the local machine.
//uiHost: "127.0.0.1",
// Retry time in milliseconds for MQTT connections
mqttReconnectTime: 15000,
// Retry time in milliseconds for Serial port connections
serialReconnectTime: 15000,
// Retry time in milliseconds for TCP socket connections
//socketReconnectTime: 10000,
// Timeout in milliseconds for TCP server socket connections
// defaults to no timeout
//socketTimeout: 120000,
// The maximum length, in characters, of any message sent to the debug sidebar tab
debugMaxLength: 1000,
// The file containing the flows. If not set, it defaults to flows_<hostname>.json
//flowFile: 'flows.json',
// To enabled pretty-printing of the flow within the flow file, set the following
// property to true:
//flowFilePretty: true,
// By default, all user data is stored in the Node-RED install directory. To
// use a different location, the following property can be used
//userDir: '/home/nol/.node-red/',
// Node-RED scans the `nodes` directory in the install directory to find nodes.
// The following property can be used to specify an additional directory to scan.
//nodesDir: '/home/nol/.node-red/nodes',
// By default, the Node-RED UI is available at http://localhost:1880/
// The following property can be used to specifiy a different root path.
// If set to false, this is disabled.
//httpAdminRoot: '/admin',
// You can protect the user interface with a userid and password by using the following property.
// The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
//httpAdminAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
// Some nodes, such as HTTP In, can be used to listen for incoming http requests.
// By default, these are served relative to '/'. The following property
// can be used to specifiy a different root path. If set to false, this is
// disabled.
//httpNodeRoot: '/nodes',
// To password protect the node-defined HTTP endpoints, the following property
// can be used.
// The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
//httpNodeAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
// When httpAdminRoot is used to move the UI to a different root path, the
// following property can be used to identify a directory of static content
// that should be served at http://localhost:1880/.
//httpStatic: '/home/nol/node-red-dashboard/',
// To password protect the static content, the following property can be used.
// The password must be an md5 hash eg.. 5f4dcc3b5aa765d61d8327deb882cf99 ('password')
//httpStaticAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
// The following property can be used in place of 'httpAdminRoot' and 'httpNodeRoot',
// to apply the same root to both parts.
//httpRoot: '/red',
// The following property can be used in place of 'httpAdminAuth' and 'httpNodeAuth',
// to apply the same authentication to both parts.
//httpAuth: {user:"user",pass:"5f4dcc3b5aa765d61d8327deb882cf99"},
// The following property can be used to disable the editor. The admin API
// is not affected by this option. To disable both the editor and the admin
// API, use either the httpRoot or httpAdminRoot properties
//disableEditor: false,
// The following property can be used to enable HTTPS
// See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
// for details on its contents.
// See the comment at the top of this file on how to load the `fs` module used by
// this setting.
//
//https: {
// key: fs.readFileSync('privatekey.pem'),
// cert: fs.readFileSync('certificate.pem')
//},
// The following property can be used to configure cross-origin resource sharing
// in the HTTP nodes.
// See https://github.com/troygoode/node-cors#configuration-options for
// details on its contents. The following is a basic permissive set of options:
//httpNodeCors: {
// origin: "*",
// methods: "GET,PUT,POST,DELETE"
//},
// Anything in this hash is globally available to all functions.
// It is accessed as context.global.
// eg:
// functionGlobalContext: { os:require('os') }
// can be accessed in a function block as:
// context.global.os
functionGlobalContext: {
// os:require('os'),
// bonescript:require('bonescript'),
// arduino:require('duino')
redis:require('redis')
},
// The following property can be used to order the categories in the editor
// palette. If a node's category is not in the list, the category will get
// added to the end of the palette.
// If not set, the following default order is used:
//paletteCategories: ['subflows', 'input', 'output', 'function', 'social', 'storage', 'analysis', 'advanced'],
// Configure the logging output
logging: {
// Only console logging is currently supported
console: {
// Level of logging to be recorded. Options are:
// fatal - only those errors which make the application unusable should be recorded
// error - record errors which are deemed fatal for a particular request + fatal errors
// warn - record problems which are non fatal + errors + fatal errors
// info - record information about the general running of the application + warn + error + fatal errors
// debug - record information which is more verbose than info + info + warn + error + fatal errors
// trace - record very detailed logging + debug + info + warn + error + fatal errors
level: "info",
// Whether or not to include metric events in the log output
metrics: false
}
}
}
The file could not be displayed because it is too large.
The file could not be displayed because it is too large.
- Pulling image from local registry:
sudo docker pull 172.16.1.5:5000/opentripplanner/opentripplanner
if you want the latest then pull it from docker site:
sudo docker pull opentripplanner/opentripplanner
- each city/area must has it's own directory containing the files to build (pdb, zip)
the build process must see a folder within the graph directory, it will build the Graph.obj
file inside the city folder.
- the city name (route-id) must be the same as the folder name
- BUILDING:
sudo docker run -p 8080:8080 -v [your local path to graphs folder]:/var/otp/graphs 172.16.1.5:5000/opentripplanner/opentripplanner --build /var/otp/graphs/[city folder]/ --router [city]
e.g:
sudo docker run -p 8080:8080 -v /home/oded/Transport/pdx:/var/otp/graphs 172.16.1.5:5000/opentripplanner/opentripplanner --build /var/otp/graphs/chicago/ --router chicago
the build process will create the Graph.obj in chicago folder.
- RUNNING
you must specify the router-id (city) when running in server mode also:
sudo docker run -p 8080:8080 -v [your local path to graphs folder]:/var/otp/graphs 172.16.1.5:5000/opentripplanner/opentripplanner --router [city] --server
e.g:
sudo docker run -p 8080:8080 -v /home/oded/Transport/pdx:/var/otp/graphs 172.16.1.5:5000/opentripplanner/opentripplanner --router chicago --server
NOTE:
- "-p 8080:8080" is the port mapping , if you want otp to take another port change: -p [your port]:8080
# bin/tcsh
# To get all the /dev/* devices needed for sshd and alike:
setenv DEV_MOUNTS "-v /dev/null:/dev/null -v /dev/urandom:/dev/urandom -v /dev/random:/dev/random"
setenv DEV_MOUNTS "${DEV_MOUNTS} -v /dev/full:/dev/full -v /dev/zero:/dev/zero"
### OPTIONAL -> if you got an etcd/helixdns instance running
#setenv DNS_STUFF "--dns=172.17.0.3"
### OPTIONAL -> link carbon container to provide metrics target
#setenv LINK "--link carbon:carbon"
### OPTIONAL -> if you want to store Elasticsearchs data outside
#setenv ES_PERSIST "-v ${HOME}/elasticsearch:/var/lib/elasticsearch"
### OPTIONAL -> To use a mapped in configuration directory
# if not used, the default will be used within the container
setenv LS_CONF "-v ${HOME}/logstash.d/:/etc/logstash/conf.d/"
### OPTIONAL -> map apache2 config into container
setenv AP_LOG "-v ${HOME}/var/log/apache2/:/var/log/apache2"
### OPTIONAL -> set the external port to something else then 80
setenv HTTP_PORT "-p 8060:80"
### OPTIONAL -> To secure kibana and elasticsearch user/passwd could be set
# if a user is set and no passwd, the user will be set as password
#setenv HTUSER kibana
#setenv HTPASSWD secretpw
\ No newline at end of file
docker run -t -i --rm -h elk --name elk --privileged -p 8050:80 -p 9200:9200 \
-v ${HOME}/logstash.d/:/etc/logstash/conf.d/ -v /home/amir:/dev/home qnib/elk:latest bash
\ No newline at end of file
LOCAL REGISTRY MANUAL
* local registry on 172.16.1.5:5000
[search the local registry]
http://172.16.1.5:5000/v1/search?q=xxx
[pull from local registry]
sudo docker pull 172.16.1.5:5000/[image-name]
[ push to local registry]
// build
sudo docker build -t [image-name] .
// tag - mandatory for first time
sudo docker tag [image-id] 172.16.1.5:5000/[image-name]
// push
sudo docker push 172.16.1.5:5000/[image-name]
[running shell on image]
sudo docker run -i -t 172.16.1.5:5000/[image-name] /bin/bash
e.g:
sudo docker run -i -t 172.16.1.5:5000/amir/base-server-no-db /bin/bash
[running docker deamon on the bridge interface - to get regular ip addresses]
sudo docker -d -b br0 &
[commit]
docker commit -m "[commit msg]" -a "[author name]" <CONTAINER ID> <IMAGE NAME>
Example
docker commit -m "ffmpeg" -a "avij" 3befccf1cb53 172.16.1.5:5000/ipgallery/mcu
\ No newline at end of file
sudo docker run -d --privileged -v /opt/docker/registry:/opt/docker/registry -e SETTINGS_FLAVOR=local -e STORAGE_PATH=/opt/docker/registry -e SEARCH_BACKEND=sqlalchemy -e SQLALCHEMY_INDEX_DATABASE=sqlite:////opt/docker/registry/docker-registry.db -p 5000:5000 registry:0.9.1
\ No newline at end of file
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all dangling images
docker rmi $(docker images -f "dangling=true" -q)
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
#!/bin/bash
sudo docker rm -f `sudo docker ps -a | grep Exited | awk '{print $1}'`
\ No newline at end of file
## dataLogic properties
dataLogic.ds.IpAddress=172.16.1.151:8080
dataLogic.threadManager.threads=8
dataLogic.threadManager.queueSize=500
log4j.prop.file.path=/home/adi/resincfg/log4j.properties
## microservice props
server.port=9009
server.host=172.16.1.151
server.worker.threads=6
rmqServer.active=false;
rmqServer.listenRMQId=dataLogic@172.16.1.151
rmqServer.WorkerThreadsNum=4
rmqServer.maxRMQSize=1000
rmqServer.logPath=/logs
rmqServer.emptyQueueOnLoad=false
## app props
No preview for this file type
[follow this]
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-graphite-on-an-ubuntu-14-04-server
https://www.digitalocean.com/community/tutorials/how-to-configure-collectd-to-gather-system-metrics-for-graphite-on-ubuntu-14-04
\ No newline at end of file
java -DconfigFile.location=/opt/mcz/config/[app-name]/config.properties -Djcd.dest=udp://localhost:25826 -Djcd.beans="*:*" -javaagent:collectd.jar -jar [app-name].jar
# Schema definitions for Whisper files. Entries are scanned in order,
# and first match wins. This file is scanned for changes every 60 seconds.
#
# [name]
# pattern = regex
# retentions = timePerPoint:timeToStore, timePerPoint:timeToStore, ...
# Carbon's internal metrics. This entry should match what is specified in
# CARBON_METRIC_PREFIX and CARBON_METRIC_INTERVAL settings
[carbon]
pattern = ^carbon\.
retentions = 60:90d
[collectd]
pattern = ^collectd.*
retentions = 10s:1d,1m:7d,10m:1y
[test]
pattern = ^test\.
retentions = 10s:10m,1m:1h,10m:1d
[default_1min_for_1day]
pattern = .*
retentions = 60s:1d
## mcx properties ##
ds.ip.address=172.16.1.10
ds.ip=172.16.1.10:9001
mclogic.sip.ip=172.16.1.244:5065
mclogic.ip=172.16.1.244:8001
# -Dmcpresence.ip=172.16.1.244:9001
# -Dmcpresence.sip.ip=172.16.1.244:5070
mcweb.ip=172.16.1.244:8080
redis.port=6379
log4j.prop.file.path=/home/amir/resincfg/log4j.properties
mcz.files.location=/opt/mcz
## microservice props
server.port=7070
server.host=172.16.1.244
server.worker.threads=6
## app props
file.name.location=/opt/mcz/config/PushServer/customerList.properties
android.push.app.username=876050233151
android.push.app.password=AIzaSyA20S_29tZdcjy9IWseviAXZczuFUu9H5M
config.apple.cert.type=development
{
"Tata": {
"Apple": {
"prod":"/opt/Certificates/ProductionAPS.p12",
"dev":"/opt/Certificates/DevelopmentAPS.p12"
},
"Google": {
"user":"876050233151",
"pass":"AIzaSyA20S_29tZdcjy9IWseviAXZczuFUu9H5M"
}
},
"Main": {
"Apple": {
"prod":"/opt/Certificates/ProductionAPS.p12",
"dev":"/opt/Certificates/DevelopmentAPS.p12"
},
"Google": {
"user":"876050233151",
"pass":"AIzaSyA20S_29tZdcjy9IWseviAXZczuFUu9H5M"
}
}
}
\ No newline at end of file
java -DconfigFile.location=/opt/mcz/config/PushServer/config.properties -jar PushServer.jar
ds.mysqldb.connection.jdbcUrl=jdbc:mysql://172.16.1.151:3306/mcz
ds.mysqldb.connection.userName=root
ds.mysqldb.connection.password=giptmgr
ds.mysqldb.connectionPool.poolSize=100
ds.mysqldb.connectionPool.minPoolSize=100
ds.mysqldb.connectionPool.maxPoolSize=500
ds.mysqldb.defaultCatalog=mcz
# available options: validate/create
ds.mysqldb.hbm2ddl=validate
ds.useCache=false
ds.activity.TTL=30
ds.activity.minDeleteHistoryBulk=100
#!/bin/sh
LOG=`curl -X POST "http://localhost:9001/ds/activity/maintenance/"`
DATE=`date`
echo "$DATE $LOG" >> /var/log/mcz-maintenance.log
#!/bin/sh
# WARNING: This file is created by the Configuration Wizard.
# Any changes to this script may be lost when adding extensions to this configuration.
# --- Start Functions ---
stopAll()
{
# We separate the stop commands into a function so we are able to use the trap command in Unix (calling a function) to stop these services
if [ "X${ALREADY_STOPPED}" != "X" ] ; then
exit
fi
# STOP POINTBASE (only if we started it)
if [ "${POINTBASE_FLAG}" = "true" ] ; then
echo "Stopping PointBase server..."
${WL_HOME}/common/bin/stopPointBase.sh -port=${POINTBASE_PORT} -name=${POINTBASE_DBNAME} >"${DOMAIN_HOME}/pointbaseShutdown.log" 2>&1
echo "PointBase server stopped."
fi
ALREADY_STOPPED="true"
# Restore IP configuration the node manager starts IP Migration
if [ "${SERVER_IP}" != "" ] ; then
${WL_HOME}/common/bin/wlsifconfig.sh -removeif "${IFNAME}" "${SERVER_IP}"
fi
}
# --- End Functions ---
# *************************************************************************
# This script is used to start WebLogic Server for this domain.
#
# To create your own start script for your domain, you can initialize the
# environment by calling @USERDOMAINHOME/setDomainEnv.
#
# setDomainEnv initializes or calls commEnv to initialize the following variables:
#
# BEA_HOME - The BEA home directory of your WebLogic installation.
# JAVA_HOME - Location of the version of Java used to start WebLogic
# Server.
# JAVA_VENDOR - Vendor of the JVM (i.e. BEA, HP, IBM, Sun, etc.)
# PATH - JDK and WebLogic directories are added to system path.
# WEBLOGIC_CLASSPATH
# - Classpath needed to start WebLogic Server.
# PATCH_CLASSPATH - Classpath used for patches
# PATCH_LIBPATH - Library path used for patches
# PATCH_PATH - Path used for patches
# WEBLOGIC_EXTENSION_DIRS - Extension dirs for WebLogic classpath patch
# JAVA_VM - The java arg specifying the VM to run. (i.e.
# - server, -hotspot, etc.)
# USER_MEM_ARGS - The variable to override the standard memory arguments
# passed to java.
# PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.
# POINTBASE_HOME - Point Base home directory.
# POINTBASE_CLASSPATH
# - Classpath needed to start PointBase.
#
# Other variables used in this script include:
# SERVER_NAME - Name of the weblogic server.
# JAVA_OPTIONS - Java command-line options for running the server. (These
# will be tagged on to the end of the JAVA_VM and
# MEM_ARGS)
#
# For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"
# (http://download.oracle.com/docs/cd/E12839_01/web.1111/e13708/overview.htm).
# *************************************************************************
umask 037
# Call setDomainEnv here.
export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/home/amir/SDK/AppDynamicsLite/AppServerAgentLite/javaagent.jar"
DOMAIN_HOME="/root/bea5/user_projects/domains/ds"
. ${DOMAIN_HOME}/bin/setDomainEnv.sh $*
SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"
SAVE_CLASSPATH="${CLASSPATH}:${DOMAIN_HOME}/lib/config"
# Start PointBase
PB_DEBUG_LEVEL="0"
if [ "${POINTBASE_FLAG}" = "true" ] ; then
${WL_HOME}/common/bin/startPointBase.sh -port=${POINTBASE_PORT} -debug=${PB_DEBUG_LEVEL} -console=false -background=true -ini=${DOMAIN_HOME}/pointbase.ini >"${DOMAIN_HOME}/pointbase.log" 2>&1
fi
JAVA_OPTIONS="${SAVE_JAVA_OPTIONS}"
SAVE_JAVA_OPTIONS=""
#CLASSPATH="${SAVE_CLASSPATH}"
CLASSPATH="${SAVE_CLASSPATH}:${ORCL_HOME}/server/modules/mscontrol.jar:${ORCL_HOME}/server/lib/jsr309-descriptor-binding.jar"
SAVE_CLASSPATH=""
trap 'stopAll' 1 2 3 15
if [ "${PRODUCTION_MODE}" = "true" ] ; then
WLS_DISPLAY_MODE="Production"
else
WLS_DISPLAY_MODE="Development"
fi
if [ "${WLS_USER}" != "" ] ; then
JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.username=${WLS_USER}"
fi
if [ "${WLS_PW}" != "" ] ; then
JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.password=${WLS_PW}"
fi
if [ "${MEDREC_WEBLOGIC_CLASSPATH}" != "" ] ; then
if [ "${CLASSPATH}" != "" ] ; then
CLASSPATH="${CLASSPATH}${CLASSPATHSEP}${MEDREC_WEBLOGIC_CLASSPATH}"
else
CLASSPATH="${MEDREC_WEBLOGIC_CLASSPATH}"
fi
fi
echo "."
echo "."
echo "JAVA Memory arguments: ${MEM_ARGS}"
echo "."
echo "WLS Start Mode=${WLS_DISPLAY_MODE}"
echo "."
echo "CLASSPATH=${CLASSPATH}"
echo "."
echo "PATH=${PATH}"
echo "."
echo "***************************************************"
echo "* To start WebLogic Server, use a username and *"
echo "* password assigned to an admin-level user. For *"
echo "* server administration, use the WebLogic Server *"
echo "* console at http://hostname:port/console *"
echo "***************************************************"
# Set up IP Migration related variables.
# Set interface name.
if [ "${Interface}" != "" ] ; then
IFNAME="${Interface}"
else
IFNAME=""
fi
# Set IP Mask.
if [ "${NetMask}" != "" ] ; then
IPMASK="${NetMask}"
else
IPMASK=""
fi
# Perform IP Migration if SERVER_IP is set by node manager.
if [ "${SERVER_IP}" != "" ] ; then
${WL_HOME}/common/bin/wlsifconfig.sh -addif "${IFNAME}" "${SERVER_IP}" "${IPMASK}"
fi
# START WEBLOGIC
echo "starting weblogic with Java version:"
${JAVA_HOME}/bin/java ${JAVA_VM} -version
# Oded - START
DS_DOMAIN="/root/bea5/user_projects/domains/ds"
export DS_DOMAIN
DS_IP_ADDRESS="172.16.1.244"
export DS_IP_ADDRESS
DS_PORT="9001"
export DS_PORT
DS_IP="$DS_IP_ADDRESS:$DS_PORT"
export DS_IP
MYSQL_PORT="3306"
export MYSQL_PORT
REDIS_PORT="6379"
export REDIS_PORT
MONGODB_PORT="27017"
export MONGODB_PORT
#DS_IP="172.16.1.244:9001"
#export DS_IP
MCPRESENCE_IP="172.16.1.244:5001"
export MCPRESENCE_IP
MCLOGIC_IP="172.16.1.244:8001"
export MCLOGIC_IP
# set to proxy/mcweb address
MCWEB_IP="172.16.1.244:8010"
export MCWEB_IP
MCPRESENCE_SIP_IP="172.16.1.244:5075"
export MCPRESENCE_SIP_IP
MCLOGIC_SIP_IP="172.16.1.244:5065"
export MCLOGIC_SIP_IP
MCWEB_SIP_IP="172.16.1.244:5060"
export MCWEB_SIP_IP
MCZ_FILES_LOCATION="/opt/mcz"
export MCZ_FILES_LOCATION
CONFIG_FILE_LOC="${DS_DOMAIN}/config/config.properties"
export CONFIG_FILE_LOC
LOG4J_ENABLED="true"
export LOG4J_ENABLED
LOG4J_CONFIG="log4j.xml"
export LOG4J_CONFIG
LOG4J_DEBUG="true"
export LOG4J_DEBUG
IGNORE_HOSTNAME_VERIFICATION="true"
export IGNORE_HOSTNAME_VERIFICATION
# Oded - END
if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
echo "^^^^^^^^^^ DS_DOMAIN is: ${DS_DOMAIN} ^^^^^^^^^^"
echo "^^^^^^^^^^ DS_IP is: ${DS_IP} ^^^^^^^^^^"
echo "^^^^^^^^^^ CONFIG_FILE_LOC is: ${CONFIG_FILE_LOC} ^^^^^^^^^^"
echo "^^^^^^^^^^ LOG4J_ENABLED is: ${LOG4J_ENABLED} ^^^^^^^^^^"
echo "^^^^^^^^^^ LOG4J_CONFIG is: ${LOG4J_CONFIG} ^^^^^^^^^^"
echo "^^^^^^^^^^ LOG4J_DEBUG is: ${LOG4J_DEBUG} ^^^^^^^^^^"
echo "^^^^^^^^^^ IGNORE_HOSTNAME_VERIFICATION is: ${IGNORE_HOSTNAME_VERIFICATION} ^^^^^^^^^^"
echo "Starting WLS with line:"
echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dc3p0.numHelperThreads=6 -Dweblogic.ThreadPoolSize=50 -Dds.domain=${DS_DOMAIN} -Dmcz.files.location=${MCZ_FILES_LOCATION} -Dds.ip.address=${DS_IP_ADDRESS} -Dds.port=${DS_PORT} -Dds.ip=${DS_IP} -Dmysql.port=${MYSQL_PORT} -Dredis.port=${REDIS_PORT} -Dmongodb.port=${MONGODB_PORT} -DconfigFile.location=${CONFIG_FILE_LOC} -Dweblogic.log.Log4jLoggingEnabled=${LOG4J_ENABLED} -Dlog4j.debug=${LOG4J_DEBUG} -Dlog4j.Configuration=${LOG4J_CONFIG} -Dweblogic.security.SSL.ignoreHostnameVerification=${IGNORE_HOSTNAME_VERIFICATION} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dc3p0.numHelperThreads=6 -Dweblogic.ThreadPoolSize=50 -Dds.domain=${DS_DOMAIN} -Dmcz.files.location=${MCZ_FILES_LOCATION} -Dds.ip.address=${DS_IP_ADDRESS} -Dds.port=${DS_PORT} -Dds.ip=${DS_IP} -Dmysql.port=${MYSQL_PORT} -Dredis.port=${REDIS_PORT} -Dmongodb.port=${MONGODB_PORT} -Dmcpresence.ip=${MCPRESENCE_IP} -Dmclogic.ip=${MCLOGIC_IP} -Dmcweb.ip=${MCWEB_IP} -Dmcpresence.sip.ip=${MCPRESENCE_SIP_IP} -Dmclogic.sip.ip=${MCLOGIC_SIP_IP} -Dmcweb.sip.ip=${MCWEB_SIP_IP} -DconfigFile.location=${CONFIG_FILE_LOC} -Dweblogic.log.Log4jLoggingEnabled=${LOG4J_ENABLED} -Dlog4j.Configuration=${LOG4J_CONFIG} -Dweblogic.security.SSL.ignoreHostnameVerification=${IGNORE_HOSTNAME_VERIFICATION} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
else
echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
fi
stopAll
popd
# Exit this script only if we have been told to exit.
if [ "${doExitFlag}" = "true" ] ; then
exit
fi
# config.occas.ver (4/5)
config.occas.ver=5
# apple.cert.type (development/production)
config.apple.cert.type=development
config.workmode=proxy
config.social.workmode=mcz
#config.social.workmode=sng
config.kaltura.user=amir.aharon@ipgallery.com
config.kaltura.partner.id=923351
config.kaltura.sub.partner.id=92335100
config.kaltura.server=http://www.kaltura.com
config.kaltura.secret.admin=8924c102edaa090ad3b55304e992e278
config.kaltura.secret.user=de25ce3fb5b4ed4c00f1dd8fa7bbbcde
config.kaltura.player.id=7529431
sconfig.msrp.session.threads=2
config.rcs.max.group.participants=5
config.rcs.max.chat.sessions=100
config.rcs.max.file.transfers=100
config.msrp.listen.port=20010
config.mobile.app.root=tata
config.mobile.app.homepage=index.html
ios.banned.audio.codecs=SPEEX/8000
#ios.banned.video.codecs=VP8/90000
android.push.app.username=876050233151
android.push.app.password=AIzaSyA20S_29tZdcjy9IWseviAXZczuFUu9H5M
email.suffix=
# config.system.im.mod (http/sip/mixed)
config.system.im.mode=sip
config.system.trusted.realm=yes
config.system.realm=GalleryAS
# config.system.patch.mode (Y/N) for SSW/Centrix push mechanism
config.system.patch.mode=N
### Kannel SMS conf ###
##smpp.ip.address=172.16.1.97
##smpp.port=13013
##smpp.user.name=foo
##smpp.password=bar
### Neustar SMS conf ###
##smpp.gateway.type=neustar
##smpp.user.name=5162088549
##smpp.password=cablevision4
##smpp.ip.address=stsmsc.neustar.biz
##activate.get.sms.polling=y
##get.sms.polling.interval=20000
#config.max.pager.msg.length=160
### Tata SMS conf ###
smpp.ip.address=10.124.17.18
smpp.port=None
smpp.user.name=Xenie
smpp.password=xiNt1
smpp.gateway.type=tata
mandatory.country.code=
config.country.code.letters=IL
sms.signature="\n\nThis message is sent by MCZ, to download visit ipgallery-mcz.com"
sms.ftr.footer="\n\nThe MCZ Team"
customer.domain.signature=MCZ.Team
broadcast.bulk.size=20
unlimited.sms=
# config.max.pager.msg.length is unlimited
config.max.pager.msg.length=1600
config.offline.task.threads=8
config.offline.task.queue.size=200
log4j.dir.path=logs
log4j.product.file.name=
dao.use.cache=false
config.conn.handler.queue.size=200
config.conn.handler.threads=8
geo.location.time.back=2
geo.location.max.distance=40
geo.location.distance.units=0
cache.expiration.timeout=120
cache.redis.database.index.timeout=0
#config.proxy.target.uri=http://172.16.1.244:9001/mcweb
#config.proxy.key=AIzaSyA20S_29tZdcjy9IWseviAXZczuFUu9H5M
log4j.conf.file.path=/logs/conf/mclogic/log4j.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true"
xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="append" value="false" />
<param name="maxBackupIndex" value="5" />
<param name="maxFileSize" value="10MB" />
<param name="file" value="/logs/mclogicLogs.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy-MM-dd HH:mm:ss} %-5p - %m%n" />
</layout>
</appender>
<root>
<!-- Levels: off, fatal, error, warn, info, debug, trace, all -->
<level value="all"/>
<appender-ref ref="file" />
</root>
</log4j:configuration>
\ No newline at end of file
#!/bin/sh
# WARNING: This file is created by the Configuration Wizard.
# Any changes to this script may be lost when adding extensions to this configuration.
DOMAIN_HOME="/root/bea5/user_projects/domains/mclogic"
${DOMAIN_HOME}/bin/startWebLogic.sh $*
# config.occas.ver (4/5)
config.occas.ver=5
# apple.cert.type (development/production)
config.apple.cert.type=development
config.workmode=proxy
config.social.workmode=mcz
#config.social.workmode=sng
config.kaltura.user=amir.aharon@ipgallery.com
config.kaltura.partner.id=923351
config.kaltura.sub.partner.id=92335100
config.kaltura.server=http://www.kaltura.com
config.kaltura.secret.admin=8924c102edaa090ad3b55304e992e278
config.kaltura.secret.user=de25ce3fb5b4ed4c00f1dd8fa7bbbcde
config.kaltura.player.id=7529431
sconfig.msrp.session.threads=2
config.rcs.max.group.participants=5
config.rcs.max.chat.sessions=100
config.rcs.max.file.transfers=100
config.msrp.listen.port=20010
config.mobile.app.root=tata
config.mobile.app.homepage=index.html
ios.banned.audio.codecs=SPEEX/8000
#ios.banned.video.codecs=VP8/90000
android.push.app.username=876050233151
android.push.app.password=AIzaSyA20S_29tZdcjy9IWseviAXZczuFUu9H5M
email.suffix=
# config.system.im.mod (http/sip/mixed)
config.system.im.mode=sip
config.system.trusted.realm=yes
config.system.realm=GalleryAS
# config.system.patch.mode (Y/N) for SSW/Centrix push mechanism
config.system.patch.mode=N
### Kannel SMS conf ###
##smpp.ip.address=172.16.1.97
##smpp.port=13013
##smpp.user.name=foo
##smpp.password=bar
### Neustar SMS conf ###
##smpp.gateway.type=neustar
##smpp.user.name=5162088549
##smpp.password=cablevision4
##smpp.ip.address=stsmsc.neustar.biz
##activate.get.sms.polling=y
##get.sms.polling.interval=20000
#config.max.pager.msg.length=160
### Tata SMS conf ###
smpp.ip.address=10.124.17.18
smpp.port=None
smpp.user.name=Xenie
smpp.password=xiNt1
smpp.gateway.type=tata
mandatory.country.code=
config.country.code.letters=IL
sms.signature="\n\nThis message is sent by MCZ, to download visit ipgallery-mcz.com"
sms.ftr.footer="\n\nThe MCZ Team"
customer.domain.signature=MCZ.Team
broadcast.bulk.size=20
unlimited.sms=
# config.max.pager.msg.length is unlimited
config.max.pager.msg.length=1600
#rcs.send.message.url=http://172.16.1.5:8080/srg/chat/v1/standalone/sendmessage
config.offline.task.threads=8
config.offline.task.queue.size=200
log4j.dir.path=logs
log4j.product.file.name=
dao.use.cache=false
config.conn.handler.queue.size=200
config.conn.handler.threads=8
geo.location.time.back=2
geo.location.max.distance=40
geo.location.distance.units=0
cache.expiration.timeout=120
cache.redis.database.index.timeout=0
#config.proxy.target.uri=http://172.16.1.244:9001/mcweb
#config.proxy.key=AIzaSyA20S_29tZdcjy9IWseviAXZczuFUu9H5M
log4j.conf.file.path=/logs/conf/mcweb/log4j.xml
# public domain if exist, otherwise public ip:port
# if proxy exist - this is the proxy address
config.public.address=172.16.1.244:8010
\ No newline at end of file
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.SubversionSCM" plugin="subversion@2.5">
<locations>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>svn://172.16.1.201/exp1/svn/repos/MCX/lib/external</remote>
<credentialsId>e3646dbb-dd52-4752-af02-480f0337285d</credentialsId>
<local>./../../../svn/lib/external</local>
<depthOption>infinity</depthOption>
<ignoreExternalsOption>true</ignoreExternalsOption>
</hudson.scm.SubversionSCM_-ModuleLocation>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>svn://172.16.1.201/exp1/svn/repos/MCX/JINFRA</remote>
<credentialsId></credentialsId>
<local>./../../../svn/MCX-JINFRA/</local>
<depthOption>infinity</depthOption>
<ignoreExternalsOption>true</ignoreExternalsOption>
</hudson.scm.SubversionSCM_-ModuleLocation>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>svn://172.16.1.201/exp1/svn/repos/MCZ_CORE</remote>
<credentialsId>e3646dbb-dd52-4752-af02-480f0337285d</credentialsId>
<local>./../../../svn/MCZCore</local>
<depthOption>infinity</depthOption>
<ignoreExternalsOption>true</ignoreExternalsOption>
</hudson.scm.SubversionSCM_-ModuleLocation>
</locations>
<excludedRegions></excludedRegions>
<includedRegions></includedRegions>
<excludedUsers></excludedUsers>
<excludedRevprop></excludedRevprop>
<excludedCommitMessages></excludedCommitMessages>
<workspaceUpdater class="hudson.scm.subversion.UpdateUpdater"/>
<ignoreDirPropChanges>false</ignoreDirPropChanges>
<filterChangelog>false</filterChangelog>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<hudson.triggers.SCMTrigger>
<spec>H 6 * * *</spec>
<ignorePostCommitHooks>false</ignorePostCommitHooks>
</hudson.triggers.SCMTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Ant plugin="ant@1.2">
<targets>buildAllSubProjects</targets>
<antName>Ant 1.9.3</antName>
<buildFile>/home/amir/svn/MCX-JINFRA/build-all.xml</buildFile>
</hudson.tasks.Ant>
<hudson.tasks.Ant plugin="ant@1.2">
<targets>all</targets>
<antName>Ant 1.9.3</antName>
<buildFile>/home/amir/svn/MCZCore/build/build-mcz-core.xml</buildFile>
</hudson.tasks.Ant>
<hudson.tasks.Ant plugin="ant@1.2">
<targets>build-war-prod</targets>
<antName>Ant 1.9.3</antName>
<buildFile>/home/amir/svn/UI/build/build-ui-resin.xml</buildFile>
<properties>RESIN_HOME=/home/amir/SDK/resin-4.0.41</properties>
</hudson.tasks.Ant>
</builders>
<publishers>
<com.zanox.hudson.plugins.FTPPublisher plugin="ftppublisher@1.2">
<siteName>local-121</siteName>
<entries>
<com.zanox.hudson.plugins.Entry>
<filePath></filePath>
<sourceFile>/home/amir/svn/dist/mcweb</sourceFile>
</com.zanox.hudson.plugins.Entry>
</entries>
<useTimestamps>false</useTimestamps>
<flatten>false</flatten>
<skip>false</skip>
</com.zanox.hudson.plugins.FTPPublisher>
<org.jenkinsci.plugins.gcm.im.GcmPublisher plugin="gcm-notification@1.0">
<targets>
<org.jenkinsci.plugins.gcm.im.GcmMessageTarget>
<userId>amira</userId>
</org.jenkinsci.plugins.gcm.im.GcmMessageTarget>
</targets>
<strategy>ALL</strategy>
<notifyOnBuildStart>false</notifyOnBuildStart>
<notifySuspects>false</notifySuspects>
<notifyCulprits>false</notifyCulprits>
<notifyFixers>false</notifyFixers>
<notifyUpstreamCommitters>false</notifyUpstreamCommitters>
<buildToChatNotifier class="hudson.plugins.im.build_notify.DefaultBuildToChatNotifier" plugin="instant-messaging@1.33"/>
<matrixMultiplier>ONLY_CONFIGURATIONS</matrixMultiplier>
</org.jenkinsci.plugins.gcm.im.GcmPublisher>
</publishers>
<buildWrappers/>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true"
xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="append" value="false" />
<param name="maxBackupIndex" value="5" />
<param name="maxFileSize" value="10MB" />
<param name="file" value="/logs/mcwebLogs.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy-MM-dd HH:mm:ss} %-5p - %m%n" />
</layout>
</appender>
<root>
<!-- Levels: off, fatal, error, warn, info, debug, trace, all -->
<level value="all"/>
<appender-ref ref="file" />
</root>
</log4j:configuration>
\ No newline at end of file
#!/bin/sh
# WARNING: This file is created by the Configuration Wizard.
# Any changes to this script may be lost when adding extensions to this configuration.
# --- Start Functions ---
stopAll()
{
# We separate the stop commands into a function so we are able to use the trap command in Unix (calling a function) to stop these services
if [ "X${ALREADY_STOPPED}" != "X" ] ; then
exit
fi
# STOP POINTBASE (only if we started it)
if [ "${POINTBASE_FLAG}" = "true" ] ; then
echo "Stopping PointBase server..."
${WL_HOME}/common/bin/stopPointBase.sh -port=${POINTBASE_PORT} -name=${POINTBASE_DBNAME} >"${DOMAIN_HOME}/pointbaseShutdown.log" 2>&1
echo "PointBase server stopped."
fi
ALREADY_STOPPED="true"
# Restore IP configuration the node manager starts IP Migration
if [ "${SERVER_IP}" != "" ] ; then
${WL_HOME}/common/bin/wlsifconfig.sh -removeif "${IFNAME}" "${SERVER_IP}"
fi
}
# --- End Functions ---
# *************************************************************************
# This script is used to start WebLogic Server for this domain.
#
# To create your own start script for your domain, you can initialize the
# environment by calling @USERDOMAINHOME/setDomainEnv.
#
# setDomainEnv initializes or calls commEnv to initialize the following variables:
#
# BEA_HOME - The BEA home directory of your WebLogic installation.
# JAVA_HOME - Location of the version of Java used to start WebLogic
# Server.
# JAVA_VENDOR - Vendor of the JVM (i.e. BEA, HP, IBM, Sun, etc.)
# PATH - JDK and WebLogic directories are added to system path.
# WEBLOGIC_CLASSPATH
# - Classpath needed to start WebLogic Server.
# PATCH_CLASSPATH - Classpath used for patches
# PATCH_LIBPATH - Library path used for patches
# PATCH_PATH - Path used for patches
# WEBLOGIC_EXTENSION_DIRS - Extension dirs for WebLogic classpath patch
# JAVA_VM - The java arg specifying the VM to run. (i.e.
# - server, -hotspot, etc.)
# USER_MEM_ARGS - The variable to override the standard memory arguments
# passed to java.
# PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.
# POINTBASE_HOME - Point Base home directory.
# POINTBASE_CLASSPATH
# - Classpath needed to start PointBase.
#
# Other variables used in this script include:
# SERVER_NAME - Name of the weblogic server.
# JAVA_OPTIONS - Java command-line options for running the server. (These
# will be tagged on to the end of the JAVA_VM and
# MEM_ARGS)
#
# For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"
# (http://download.oracle.com/docs/cd/E12839_01/web.1111/e13708/overview.htm).
# *************************************************************************
umask 037
# Call setDomainEnv here.
export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/home/amir/SDK/AppDynamicsLite/AppServerAgentLite/javaagent.jar -Dappdynamics.viewer.port=8991"
DOMAIN_HOME="/root/bea5/user_projects/domains/mcweb"
. ${DOMAIN_HOME}/bin/setDomainEnv.sh $*
SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"
SAVE_CLASSPATH="${CLASSPATH}"
# Start PointBase
PB_DEBUG_LEVEL="0"
if [ "${POINTBASE_FLAG}" = "true" ] ; then
${WL_HOME}/common/bin/startPointBase.sh -port=${POINTBASE_PORT} -debug=${PB_DEBUG_LEVEL} -console=false -background=true -ini=${DOMAIN_HOME}/pointbase.ini >"${DOMAIN_HOME}/pointbase.log" 2>&1
fi
JAVA_OPTIONS="${SAVE_JAVA_OPTIONS}"
SAVE_JAVA_OPTIONS=""
#CLASSPATH="${SAVE_CLASSPATH}"
CLASSPATH="${SAVE_CLASSPATH}:${ORCL_HOME}/server/modules/mscontrol.jar:${ORCL_HOME}/server/lib/jsr309-descriptor-binding.jar"
SAVE_CLASSPATH=""
trap 'stopAll' 1 2 3 15
if [ "${PRODUCTION_MODE}" = "true" ] ; then
WLS_DISPLAY_MODE="Production"
else
WLS_DISPLAY_MODE="Development"
fi
if [ "${WLS_USER}" != "" ] ; then
JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.username=${WLS_USER}"
fi
if [ "${WLS_PW}" != "" ] ; then
JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.password=${WLS_PW}"
fi
if [ "${MEDREC_WEBLOGIC_CLASSPATH}" != "" ] ; then
if [ "${CLASSPATH}" != "" ] ; then
CLASSPATH="${CLASSPATH}${CLASSPATHSEP}${MEDREC_WEBLOGIC_CLASSPATH}"
else
CLASSPATH="${MEDREC_WEBLOGIC_CLASSPATH}"
fi
fi
echo "."
echo "."
echo "JAVA Memory arguments: ${MEM_ARGS}"
echo "."
echo "WLS Start Mode=${WLS_DISPLAY_MODE}"
echo "."
echo "CLASSPATH=${CLASSPATH}"
echo "."
echo "PATH=${PATH}"
echo "."
echo "***************************************************"
echo "* To start WebLogic Server, use a username and *"
echo "* password assigned to an admin-level user. For *"
echo "* server administration, use the WebLogic Server *"
echo "* console at http://hostname:port/console *"
echo "***************************************************"
# Set up IP Migration related variables.
# Set interface name.
if [ "${Interface}" != "" ] ; then
IFNAME="${Interface}"
else
IFNAME=""
fi
# Set IP Mask.
if [ "${NetMask}" != "" ] ; then
IPMASK="${NetMask}"
else
IPMASK=""
fi
# Perform IP Migration if SERVER_IP is set by node manager.
if [ "${SERVER_IP}" != "" ] ; then
${WL_HOME}/common/bin/wlsifconfig.sh -addif "${IFNAME}" "${SERVER_IP}" "${IPMASK}"
fi
# START WEBLOGIC
echo "starting weblogic with Java version:"
${JAVA_HOME}/bin/java ${JAVA_VM} -version
# Oded - set MCWEBDOMAIN - START
MCWEBDOMAIN="/root/bea5/user_projects/domains/mcweb"
export MCWEBDOMAIN
MCZ_FILES_LOCATION="/opt/mcz"
export MCZ_FILES_LOCATION
#DS_IP="172.16.1.244:9001"
#export DS_IP
DS_IP_ADDRESS="172.16.1.244"
export DS_IP_ADDRESS
DS_PORT="9001"
export DS_PORT
DS_IP="$DS_IP_ADDRESS:$DS_PORT"
export DS_IP
MYSQL_PORT="3306"
export MYSQL_PORT
REDIS_PORT="6379"
export REDIS_PORT
MCPRESENCE_IP="172.16.1.244:5001"
export MCPRESENCE_IP
MCLOGIC_IP="172.16.1.244:8001"
export MCLOGIC_IP
MCWEB_IP="172.16.1.244:7001"
export MCWEB_IP
MCPRESENCE_SIP_IP="172.16.1.244:5075"
export MCPRESENCE_SIP_IP
MCLOGIC_SIP_IP="172.16.1.244:5065"
export MCLOGIC_SIP_IP
MCWEB_SIP_IP="172.16.1.244:5060"
export MCWEB_SIP_IP
CONFIG_FILE_LOC=${MCWEBDOMAIN}/config/config.properties
export CONFIG_FILE_LOC
# Oded - set MCWEBDOMAIN - END
if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
echo "^^^^^^^^^^ MCWEBDOMAIN is: ${MCWEBDOMAIN} ^^^^^^^^^^"
echo "^^^^^^^^^^ DS_IP is: ${DS_IP} ^^^^^^^^^^"
echo "^^^^^^^^^^ MCPRESENCE_IP is: ${MCPRESENCE_IP} ^^^^^^^^^^"
echo "^^^^^^^^^^ MCLOGIC_IP is: ${MCLOGIC_IP} ^^^^^^^^^^"
echo "^^^^^^^^^^ MCWEB_IP is: ${MCWEB_IP} ^^^^^^^^^^"
echo "^^^^^^^^^^ MCPRESENCE_SIP_IP is: ${MCPRESENCE_SIP_IP} ^^^^^^^^^^"
echo "^^^^^^^^^^ MCLOGIC_SIP_IP is: ${MCLOGIC_SIP_IP} ^^^^^^^^^^"
echo "^^^^^^^^^^ MCWEB_SIP_IP is: ${MCWEB_SIP_IP} ^^^^^^^^^^"
echo "^^^^^^^^^^ CONFIG_FILE_LOC is: ${CONFIG_FILE_LOC} ^^^^^^^^^^"
echo "Starting WLS with line:"
echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dc3p0.numHelperThreads=6 -Dweblogic.ThreadPoolSize=50 -Dmcweb.domain=${MCWEBDOMAIN} -Dmcz.files.location=${MCZ_FILES_LOCATION} -Dds.ip.address=${DS_IP_ADDRESS} -Dds.port=${DS_PORT} -Dds.ip=${DS_IP} -Dmysql.port=${MYSQL_PORT} -Dredis.port=${REDIS_PORT} -Dmcpresence.ip=${MCPRESENCE_IP} -Dmclogic.ip=${MCLOGIC_IP} -Dmcweb.ip=${MCWEB_IP} -Dmcpresence.sip.ip=${MCPRESENCE_SIP_IP} -Dmclogic.sip.ip=${MCLOGIC_SIP_IP} -Dmcweb.sip.ip=${MCWEB_SIP_IP} -DconfigFile.location=${CONFIG_FILE_LOC} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dc3p0.numHelperThreads=6 -Dweblogic.ThreadPoolSize=50 -Dmcweb.domain=${MCWEBDOMAIN} -Dmcz.files.location=${MCZ_FILES_LOCATION} -Dds.ip.address=${DS_IP_ADDRESS} -Dds.port=${DS_PORT} -Dds.ip=${DS_IP} -Dmysql.port=${MYSQL_PORT} -Dredis.port=${REDIS_PORT} -Dmcpresence.ip=${MCPRESENCE_IP} -Dmclogic.ip=${MCLOGIC_IP} -Dmcweb.ip=${MCWEB_IP} -Dmcpresence.sip.ip=${MCPRESENCE_SIP_IP} -Dmclogic.sip.ip=${MCLOGIC_SIP_IP} -Dmcweb.sip.ip=${MCWEB_SIP_IP} -DconfigFile.location=${CONFIG_FILE_LOC} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
else
echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
fi
stopAll
popd
# Exit this script only if we have been told to exit.
if [ "${doExitFlag}" = "true" ] ; then
exit
fi
#user www-data;
user root;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
server {
listen 8020 default_server;
listen [::]:8020 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location /mcweb/user_images/ {
root /opt/mcz;
}
# Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
#location /RequestDenied {
# proxy_pass http://127.0.0.1:8080;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /usr/share/nginx/html;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
# fastcgi_pass unix:/var/run/php5-fpm.sock;
# fastcgi_index index.php;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# root html;
# index index.html index.htm;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
#
# root html;
# index index.html index.htm;
#
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
#
# ssl_session_timeout 5m;
#
# ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
# ssl_prefer_server_ciphers on;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}
Program Arguments:
==================
--root-directory "/home/adi/resin-4.0.41"
-conf "/home/adi/svn/mcx_workspace/Servers/Resin 4.0 2 at localhost-config/resin.xml"
-verbose
-server app-0 console
VM arguments:
=============
-Dresin.home="/home/adi/resin-4.0.41"
-Djava.util.logging.manager=com.caucho.log.LogManagerImpl
-Djava.system.class.loader=com.caucho.loader.SystemClassLoader
-Djavax.management.builder.initial=com.caucho.jmx.MBeanServerBuilderImpl
-Djava.awt.headless=true
-Dresin.home="/home/adi/resin-4.0.41"
-Dserver.address="localhost"
-Dserver.port="8080"
-Xss1m -Xmx512m -server
-Djava.library.path="/home/adi/resin-4.0.41/libexec64:/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib"
-Dmongodb.port=27017
-Dds.ip.address=172.16.1.151
-Dds.ip=172.16.1.151:8080
-Dmclogic.sip.ip=172.16.1.151:5076
-Dmclogic.ip=172.16.1.151:8080
-Dmcweb.sip.ip=172.16.1.151:5060
-Dmcweb.ip=172.16.1.151:8080
-Dmcpresence.ip=1.1.1.1:9999
-Dmcpresence.sip.ip=1.1.1.1:9999
-Dredis.port=6379
-DconfigFile.location=/opt/mcx/config
-Dmcz.files.location=/opt/mcz
\ No newline at end of file
-Djava.util.logging.manager=com.caucho.log.LogManagerImpl
-Djava.system.class.loader=com.caucho.loader.SystemClassLoader
-Djavax.management.builder.initial=com.caucho.jmx.MBeanServerBuilderImpl
-Djava.awt.headless=true
-Dserver.address="localhost"
-Dserver.port="8080"
-Xmn512M -Xms1024M
-Xss512m -Xmx2048m -server
-XX:MaxPermSize=512m
-Dds.ip.address=172.16.1.10
-Dds.ip=172.16.1.10:9001
-Dmclogic.sip.ip=172.16.1.97:5076
-Dmclogic.ip=172.16.1.97:8001
-Dmcpresence.ip=172.16.1.97:9001
-Dmcpresence.sip.ip=172.16.1.97:5070
-Dmcweb.ip=172.16.1.97:8080
-Dredis.port=6379
-DconfigFile.location=/root/bea5/user_projects/domains/mclogic/config/config.properties
-Dlog4j.prop.file.path=/root/bea5/user_projects/domains/mclogic/config/log4j.properties
-Dmcz.files.location=/opt/mcz
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-Djava.library.path="/home/gil/sdks/resin-4.0.38/libexec64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib"
./start-resin.sh start
./start-resin.sh stop
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
- Resin 4.0 configuration file.
--><resin xmlns="http://caucho.com/ns/resin" xmlns:resin="urn:java:com.caucho.resin">
<!-- property-based Resin configuration -->
<resin:properties optional="true" path="${__DIR__}/resin.properties"/>
<resin:if test="${properties_import_url}">
<resin:properties optional="true" path="${properties_import_url}" recover="true"/>
</resin:if>
<!-- Logging configuration for the JDK logging API -->
<log-handler format=" {${thread}} ${log.message}" level="all" name="" path="stdout:" timestamp="[%y-%m-%d %H:%M:%S.%s]"/>
<!--
- Alternative pseudo-TTCC log format
-
- <log-handler name="" level="all" path="stdout:"
- timestamp="%y-%m-%d %H:%M:%S.%s"
- format=" [${thread}] ${log.level} ${log.shortName} - ${log.message}"/>
-->
<!--
- level='info' for production
- 'fine' or 'finer' for development and troubleshooting
-->
<logger level="${log_level?:'info'}" name=""/>
<logger level="config" name="com.caucho.java"/>
<logger level="config" name="com.caucho.loader"/>
<!--
- Default configuration applied to all clusters, including
- HTTP, HTTPS, and /resin-admin configuration.
-->
<resin:import path="${__DIR__}/cluster-default.xml"/>
<!--
- health configuration
-->
<resin:import path="${__DIR__}/health.xml"/>
<!--
- Remote management requires at least one enabled admin user.
-->
<resin:AdminAuthenticator>
<user name="${admin_user}" password="${admin_password}"/>
<resin:import optional="true" path="${__DIR__}/admin-users.xml"/>
</resin:AdminAuthenticator>
<!--
- For clustered systems, create a password in as cluster_system_key
-->
<cluster-system-key>${cluster_system_key}</cluster-system-key>
<!--
- For production sites, change dependency-check-interval to something
- like 600s, so it only checks for updates every 10 minutes.
-->
<dependency-check-interval>-1</dependency-check-interval>
<!-- For resin.properties dynamic cluster joining -->
<home-cluster>${home_cluster}</home-cluster>
<home-server>${home_server}</home-server>
<elastic-server>${elastic_server}</elastic-server>
<elastic-dns>${elastic_dns}</elastic-dns>
<!--
- Configures the main application cluster. Load-balancing configurations
- will also have a web cluster.
-->
<cluster id="app">
<!-- define the servers in the cluster -->
<server-multi address-list="${app_servers}" id-prefix="app-" port="6800"/>
<host-default>
<!-- creates the webapps directory for .war expansion -->
<dependency-check-interval>2s</dependency-check-interval>
<web-app-deploy expand-preserve-fileset="WEB-INF/work/**" multiversion-routing="${webapp_multiversion_routing}" path="webapps" path-suffix="${elastic_webapp?resin.id:''}" startup-mode="lazy"/>
</host-default>
<!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
<host-deploy path="hosts">
<host-default>
<resin:import optional="true" path="host.xml"/>
</host-default>
</host-deploy>
<!-- the default host, matching any host name -->
<host id="" root-directory=".">
<!--
- webapps can be overridden/extended in the resin.xml
-->
</host>
<resin:if test="${resin_doc}">
<host id="${resin_doc_host}" root-directory="${resin_doc_host}">
<web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
</host>
</resin:if>
</cluster>
<cluster id="web">
<!-- define the servers in the cluster -->
<server-multi address-list="${web_servers}" id-prefix="web-" port="6810"/>
<host id="" root-directory="web">
<web-app id="/async">
<resin:LoadBalance cluster="app" regexp=""/>
</web-app>
</host>
</cluster>
<cluster xmlns:memcache="urn:java:com.caucho.memcached" id="memcached">
<!-- define the servers in the cluster -->
<server-multi address-list="${memcached_servers}" id-prefix="memcached-" port="6820">
<!-- listen for the memcache protocol -->
<listen keepalive-timeout="600s" port="${memcached_port?:11211}" socket-timeout="600s">
<memcache:MemcachedProtocol/>
</listen>
</server-multi>
</cluster>
<cluster id="proxycache">
<!-- define the servers in the cluster -->
<server-multi address-list="${proxycache_servers}" id-prefix="proxycache-" port="6830"/>
<host id="" root-directory="proxycache">
</host>
</cluster>
<class-loader>
<tree-loader path="${resin.home}/resin-inf"/>
</class-loader>
<database jndi-name="jdbc/mcz">
<driver type="com.mysql.jdbc.Driver">
<url>jdbc:mysql://localhost:3306/mcz</url>
<user>root</user>
<password>giptmgr</password>
</driver>
</database>
</resin>
\ No newline at end of file
#!/bin/sh
JAVA_HOME=/usr/bin/java
RESIN_HOME=/usr/local/share/resin-4.0.38/
RESIN_ROOT=/var/resin
java=/usr/bin/java
export JAVA_HOME
export RESIN_HOME
export RESIN_ROOT
#MYARGS= -Xmn512M -Xms1024M -Xss512m -Xmx2048m -server -XX:MaxPermSize=512m -Dds.ip=172.16.1.71:9001 -Dmclogic.sip.ip=172.16.1.72:5076 -Dmclogic.ip=172.16.1.70:8001 -Dmcpresence.ip=172.16.1.71:9001 -Dmcpresence.sip.ip=172.16.1.71:5070 -Dmcweb.ip=172.16.1.70:7001 -DconfigFile.location=/root/bea5/user_projects/domains/commLogic/config
export MYARGS
java -jar -Xmn512M -Xms1024M -Xss512m -Xmx2048m -server -XX:MaxPermSize=512m -Dds.ip=172.16.1.71:9001 -Dmclogic.sip.ip=172.16.1.72:5076 -Dmclogic.ip=172.16.1.70:8001 -Dmcpresence.ip=172.16.1.71:9001 -Dmcpresence.sip.ip=172.16.1.71:5070 -Dmcweb.ip=172.16.1.70:7001 -DconfigFile.location=/root/bea5/user_projects/domains/commLogic/config/config.properties \
$RESIN_HOME/lib/resin.jar \
-root-directory $RESIN_ROOT \
-conf /etc/resin/resin.xml \
-server app-0 \
$* \
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment