Archive: Namaste PHP AMQP framework v1.0 (2017-2020)
952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
This commit is contained in:
26
deployment/apache.conf
Normal file
26
deployment/apache.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
# Namaste Virtual Host Configuration
|
||||
<VirtualHost *:80>
|
||||
ServerName namaste
|
||||
ServerAlias namaste
|
||||
ServerAdmin mike@givingassistant.org
|
||||
DocumentRoot /home/app
|
||||
DirectoryIndex index.php
|
||||
<Directory /home/app>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride All
|
||||
Satisfy Any
|
||||
Require all granted
|
||||
</Directory>
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
LogFormat "%{Referer}i -> %U" referer
|
||||
LogFormat "%{User-agent}i" agent
|
||||
CustomLog /var/log/namaste_log common
|
||||
ErrorLog /var/log/namaste_error.log
|
||||
CustomLog /var/log/namaste_access.log combined
|
||||
|
||||
# Possible values include: debug, info, notice, warn, error, crit,
|
||||
# alert, emerg.
|
||||
LogLevel warn
|
||||
ServerSignature Off
|
||||
</VirtualHost>
|
||||
232
deployment/development/dev_env_admin.xml
Normal file
232
deployment/development/dev_env_admin.xml
Normal file
@@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Remember - this is the development level env.XML definition and values here are expected to
|
||||
overwrite the base XML file.
|
||||
|
||||
This is the config file for the admin server on:
|
||||
|
||||
namaste.admin.dev.givingassistant.org
|
||||
|
||||
This file is NOT checked into source-code control.
|
||||
|
||||
|
||||
@author: mike@givingassistant.org
|
||||
@version: 1.0
|
||||
|
||||
HISTORY:
|
||||
========
|
||||
10-29-20 mks original coding
|
||||
|
||||
-->
|
||||
<application>
|
||||
<id>
|
||||
<envName>development</envName> <!-- must be: production, qa, or development -->
|
||||
</id>
|
||||
<syslog>0</syslog> <!-- boolean: enable syslog over console log -->
|
||||
<auditOn>0</auditOn> <!-- enables auditing micro-service overrides template setting -->
|
||||
<journalOn>0</journalOn> <!-- enables journaling micro-service overrides template setting -->
|
||||
<!-- enable when NAMASTE becomes a user-management system...
|
||||
<allowMultipleUserSessions>1</allowMultipleUserSessions>
|
||||
<sessionExpirationRenewal>15</sessionExpirationRenewal> -->
|
||||
|
||||
<!-- services config -->
|
||||
<appServer>
|
||||
<isLocal>0</isLocal>
|
||||
</appServer>
|
||||
<admin>
|
||||
<isLocal>1</isLocal>
|
||||
</admin>
|
||||
<segundo>
|
||||
<isLocal>0</isLocal>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<isLocal>0</isLocal>
|
||||
</tercero>
|
||||
|
||||
<!-- defines the external caching service end-point -->
|
||||
<cache>
|
||||
<server>
|
||||
<hostName>namastedb.dev.givingassistant.org</hostName>
|
||||
<portNum>11211</portNum>
|
||||
<persistentID>development</persistentID>
|
||||
</server>
|
||||
</cache>
|
||||
<!-- defines the database(s) used -->
|
||||
<database>
|
||||
<!-- values can be overwritten by individual schemas - these are the defaults -->
|
||||
<mongodb>
|
||||
<enabled>1</enabled> <!-- if either admin or namaste is enabled, then this must be enabled -->
|
||||
<adminPassword>einstein</adminPassword>
|
||||
<admin>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<isLocal>1</isLocal>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</admin>
|
||||
<appServer>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<!-- stand-alone instance host/port : will be ignored if sharding or repl-set is on -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<enabled>0</enabled>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled>
|
||||
</sharding>
|
||||
</tercero>
|
||||
</mongodb>
|
||||
<PDO> <!-- aka: mysql, aka mariadb: supports only repl sets/stand-alone, not sharding -->
|
||||
<appServer>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<PDO_master>
|
||||
<db_hostname>namastedb.dev.givingassistant.org</db_hostname>
|
||||
<db_username>gaAdmin</db_username>
|
||||
<db_password>74SI1^0e</db_password>
|
||||
<db_port>3306</db_port>
|
||||
</PDO_master>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<enabled>1</enabled>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<PDO_master>
|
||||
<db_hostname>namastedb.dev.givingassistant.org</db_hostname>
|
||||
<db_username>gaAdmin</db_username>
|
||||
<db_password>74SI1^0e</db_password>
|
||||
<db_port>3306</db_port>
|
||||
<db_database>givva_namaste_warehouse</db_database>
|
||||
</PDO_master>
|
||||
</segundo>
|
||||
</PDO>
|
||||
</database>
|
||||
<!-- the MQ resource definition -->
|
||||
<brokerServices>
|
||||
<vhost>gadev</vhost>
|
||||
<queueTag>gadev_</queueTag>
|
||||
<appServer>
|
||||
<isLocal>0</isLocal>
|
||||
<!-- by default, the broker tag defines the PRIME broker resource -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<apiPort>15672</apiPort>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<mBroker>0</mBroker>
|
||||
</Instances>
|
||||
</appServer>
|
||||
<admin>
|
||||
<!-- the administrative service -->
|
||||
<isLocal>1</isLocal>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<adminBrokerIn>4</adminBrokerIn>
|
||||
</Instances>
|
||||
</admin>
|
||||
<segundo>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<uBroker>2</uBroker>
|
||||
</Instances>
|
||||
</tercero>
|
||||
</brokerServices>
|
||||
|
||||
<!--
|
||||
The migration section only appears in the env.xml file - it should *never* be in the main (namaste.xml) file.
|
||||
In other words, we don't want to commit this data to source as it's only present for the purpose of managing
|
||||
a back-end process...
|
||||
|
||||
Specifically, the migration section deals with data migration and defines the source repository containing
|
||||
the data to be brought into Namaste.
|
||||
|
||||
Currently the only supported schemas are MYSQL and MONGO (as source databases).
|
||||
Additionally, mysql is only imported into mongo and mongo is only imported into mysql.
|
||||
-->
|
||||
<migration>
|
||||
<numRecsInXfer>75</numRecsInXfer> <!-- use this value to bypass namaste record limit -->
|
||||
<numRecsInTest>3</numRecsInTest> <!-- use this value to set the # records to fetch in test mode -->
|
||||
<mysql>
|
||||
<!-- URI of the remote DB service -->
|
||||
<host>development-cluster.cluster-chnkxhe6orzk.us-east-1.rds.amazonaws.com</host>
|
||||
<!-- PORT number of the remote DB -->
|
||||
<port>3306</port>
|
||||
<!-- user login for the remote DB -->
|
||||
<user>gamaster</user>
|
||||
<!-- user pass for the remote DB -->
|
||||
<pass>Development123!</pass>
|
||||
<!-- name of the remote database -->
|
||||
<database>ga_dev</database>
|
||||
<!-- charset of the remote DB -->
|
||||
<db_charset>charset=utf8mb4</db_charset>
|
||||
</mysql>
|
||||
<mongo>
|
||||
<!-- URI of the remote DB service -->
|
||||
<host>development-cluster.cluster-chnkxhe6orzk.us-east-1.rds.amazonaws.com</host>
|
||||
<!-- instance type - must be either: shard, replSet, or standAlone -->
|
||||
<instanceType>standAlone</instanceType>
|
||||
<!-- PORT number of the remote DB -->
|
||||
<port>3306</port>
|
||||
<!-- set to 1 if login required -->
|
||||
<userSec>0</userSec>
|
||||
<!-- where is the user pw stored? -->
|
||||
<authSource>admin</authSource>
|
||||
<!-- user login for the remote DB -->
|
||||
<user>gamaster</user>
|
||||
<!-- user pass for the remote DB -->
|
||||
<pass>Development123!</pass>
|
||||
<!-- name of the remote database -->
|
||||
<database>givva</database>
|
||||
<!-- do not change this... -->
|
||||
<readPreference>primary</readPreference>
|
||||
<!-- or this... -->
|
||||
<!-- cannot be less than 500, a value of 0 => disabled -->
|
||||
<heartbeatFrequencyMS>5000</heartbeatFrequencyMS>
|
||||
<!-- replSet name if replSets used -->
|
||||
<replSetName>none</replSetName>
|
||||
<!-- replSet nodes - minimum = 3! -->
|
||||
<replSetDSN>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
</replSetDSN>
|
||||
<!-- sharding mongos service -->
|
||||
<mongosNodes>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
</mongosNodes>
|
||||
</mongo>
|
||||
</migration>
|
||||
|
||||
<security>
|
||||
<useRestrictedList>0</useRestrictedList>
|
||||
</security>
|
||||
</application>
|
||||
215
deployment/development/dev_env_appServer.xml
Normal file
215
deployment/development/dev_env_appServer.xml
Normal file
@@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Remember - this is the development level env.XML definition and values here are expected to
|
||||
overwrite the base XML file.
|
||||
|
||||
This is the config file for the appServer service on:
|
||||
|
||||
namaste.appserver.dev.givingassistant.org
|
||||
|
||||
This file is NOT checked into source-code control.
|
||||
|
||||
|
||||
@author: mike@givingassistant.org
|
||||
@version: 1.0
|
||||
|
||||
HISTORY:
|
||||
========
|
||||
10-28-20 mks original coding
|
||||
|
||||
-->
|
||||
<application>
|
||||
<id>
|
||||
<envName>development</envName> <!-- must be: production, qa, or development -->
|
||||
</id>
|
||||
<syslog>0</syslog> <!-- boolean: enable syslog over console log -->
|
||||
<auditOn>0</auditOn> <!-- enables auditing micro-service overrides template setting -->
|
||||
<journalOn>0</journalOn> <!-- enables journaling micro-service overrides template setting -->
|
||||
<!-- enable when NAMASTE becomes a user-management system...
|
||||
<allowMultipleUserSessions>1</allowMultipleUserSessions>
|
||||
<sessionExpirationRenewal>15</sessionExpirationRenewal> -->
|
||||
|
||||
<!-- defines the external caching service end-point -->
|
||||
<cache>
|
||||
<server>
|
||||
<hostName>namastedb.dev.givingassistant.org</hostName>
|
||||
<portNum>11211</portNum>
|
||||
<persistentID>development</persistentID>
|
||||
</server>
|
||||
</cache>
|
||||
<!-- defines the database(s) used -->
|
||||
<database>
|
||||
<!-- values can be overwritten by individual schemas - these are the defaults -->
|
||||
<mongodb>
|
||||
<enabled>1</enabled> <!-- if either admin or namaste is enabled, then this must be enabled -->
|
||||
<adminPassword>einstein</adminPassword>
|
||||
<admin>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</admin>
|
||||
<appServer>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<!-- stand-alone instance host/port : will be ignored if sharding or repl-set is on -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<enabled>0</enabled>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled>
|
||||
</sharding>
|
||||
</tercero>
|
||||
</mongodb>
|
||||
<PDO> <!-- aka: mysql, aka mariadb: supports only repl sets/stand-alone, not sharding -->
|
||||
<appServer>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<PDO_master>
|
||||
<db_hostname>namastedb.dev.givingassistant.org</db_hostname>
|
||||
<db_username>gaAdmin</db_username>
|
||||
<db_password>74SI1^0e</db_password>
|
||||
<db_port>3306</db_port>
|
||||
</PDO_master>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<enabled>1</enabled>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<PDO_master>
|
||||
<db_hostname>namastedb.dev.givingassistant.org</db_hostname>
|
||||
<db_username>gaAdmin</db_username>
|
||||
<db_password>74SI1^0e</db_password>
|
||||
<db_port>3306</db_port>
|
||||
<db_database>givva_namaste_warehouse</db_database>
|
||||
</PDO_master>
|
||||
</segundo>
|
||||
</PDO>
|
||||
</database>
|
||||
<!-- the MQ resource definition -->
|
||||
<brokerServices>
|
||||
<vhost>gadev</vhost>
|
||||
<queueTag>gadev_</queueTag>
|
||||
<appServer>
|
||||
<!-- by default, the broker tag defines the PRIME broker resource -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<apiPort>15672</apiPort>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<mBroker>0</mBroker>
|
||||
</Instances>
|
||||
</appServer>
|
||||
<admin>
|
||||
<!-- the administrative service -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<adminBrokerIn>4</adminBrokerIn>
|
||||
</Instances>
|
||||
</admin>
|
||||
<segundo>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<uBroker>2</uBroker>
|
||||
</Instances>
|
||||
</tercero>
|
||||
</brokerServices>
|
||||
|
||||
<!--
|
||||
The migration section only appears in the env.xml file - it should *never* be in the main (namaste.xml) file.
|
||||
In other words, we don't want to commit this data to source as it's only present for the purpose of managing
|
||||
a back-end process...
|
||||
|
||||
Specifically, the migration section deals with data migration and defines the source repository containing
|
||||
the data to be brought into Namaste.
|
||||
|
||||
Currently the only supported schemas are MYSQL and MONGO (as source databases).
|
||||
Additionally, mysql is only imported into mongo and mongo is only imported into mysql.
|
||||
-->
|
||||
<migration>
|
||||
<numRecsInXfer>75</numRecsInXfer> <!-- use this value to bypass namaste record limit -->
|
||||
<numRecsInTest>3</numRecsInTest> <!-- use this value to set the # records to fetch in test mode -->
|
||||
<mysql>
|
||||
<!-- URI of the remote DB service -->
|
||||
<host>development-cluster.cluster-chnkxhe6orzk.us-east-1.rds.amazonaws.com</host>
|
||||
<!-- PORT number of the remote DB -->
|
||||
<port>3306</port>
|
||||
<!-- user login for the remote DB -->
|
||||
<user>gamaster</user>
|
||||
<!-- user pass for the remote DB -->
|
||||
<pass>Development123!</pass>
|
||||
<!-- name of the remote database -->
|
||||
<database>ga_dev</database>
|
||||
<!-- charset of the remote DB -->
|
||||
<db_charset>charset=utf8mb4</db_charset>
|
||||
</mysql>
|
||||
<mongo>
|
||||
<!-- URI of the remote DB service -->
|
||||
<host>development-cluster.cluster-chnkxhe6orzk.us-east-1.rds.amazonaws.com</host>
|
||||
<!-- instance type - must be either: shard, replSet, or standAlone -->
|
||||
<instanceType>standAlone</instanceType>
|
||||
<!-- PORT number of the remote DB -->
|
||||
<port>3306</port>
|
||||
<!-- set to 1 if login required -->
|
||||
<userSec>0</userSec>
|
||||
<!-- where is the user pw stored? -->
|
||||
<authSource>admin</authSource>
|
||||
<!-- user login for the remote DB -->
|
||||
<user>gamaster</user>
|
||||
<!-- user pass for the remote DB -->
|
||||
<pass>Development123!</pass>
|
||||
<!-- name of the remote database -->
|
||||
<database>givva</database>
|
||||
<!-- do not change this... -->
|
||||
<readPreference>primary</readPreference>
|
||||
<!-- or this... -->
|
||||
<!-- cannot be less than 500, a value of 0 => disabled -->
|
||||
<heartbeatFrequencyMS>5000</heartbeatFrequencyMS>
|
||||
<!-- replSet name if replSets used -->
|
||||
<replSetName>none</replSetName>
|
||||
<!-- replSet nodes - minimum = 3! -->
|
||||
<replSetDSN>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
</replSetDSN>
|
||||
<!-- sharding mongos service -->
|
||||
<mongosNodes>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
</mongosNodes>
|
||||
</mongo>
|
||||
</migration>
|
||||
|
||||
<security>
|
||||
<useRestrictedList>0</useRestrictedList>
|
||||
</security>
|
||||
</application>
|
||||
220
deployment/development/dev_env_segundo.xml
Normal file
220
deployment/development/dev_env_segundo.xml
Normal file
@@ -0,0 +1,220 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Remember - this is the development level env.XML definition and values here are expected to
|
||||
overwrite the base XML file.
|
||||
|
||||
This is the config file for the segundo server on:
|
||||
|
||||
namaste.segundo.dev.givingassistant.org
|
||||
|
||||
This file is NOT checked into source-code control.
|
||||
|
||||
|
||||
@author: mike@givingassistant.org
|
||||
@version: 1.0
|
||||
|
||||
HISTORY:
|
||||
========
|
||||
10-30-20 mks original coding
|
||||
|
||||
-->
|
||||
<application>
|
||||
<id>
|
||||
<envName>development</envName> <!-- must be: production, qa, or development -->
|
||||
</id>
|
||||
<syslog>0</syslog> <!-- boolean: enable syslog over console log -->
|
||||
<auditOn>0</auditOn> <!-- enables auditing micro-service overrides template setting -->
|
||||
<journalOn>0</journalOn> <!-- enables journaling micro-service overrides template setting -->
|
||||
<!-- enable when NAMASTE becomes a user-management system...
|
||||
<allowMultipleUserSessions>1</allowMultipleUserSessions>
|
||||
<sessionExpirationRenewal>15</sessionExpirationRenewal> -->
|
||||
<appServer>
|
||||
<isLocal>0</isLocal>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<isLocal>1</isLocal>
|
||||
</segundo>
|
||||
|
||||
<!-- defines the external caching service end-point -->
|
||||
<cache>
|
||||
<server>
|
||||
<hostName>namastedb.dev.givingassistant.org</hostName>
|
||||
<portNum>11211</portNum>
|
||||
<persistentID>development</persistentID>
|
||||
</server>
|
||||
</cache>
|
||||
<!-- defines the database(s) used -->
|
||||
<database>
|
||||
<!-- values can be overwritten by individual schemas - these are the defaults -->
|
||||
<mongodb>
|
||||
<enabled>1</enabled> <!-- if either admin or namaste is enabled, then this must be enabled -->
|
||||
<adminPassword>einstein</adminPassword>
|
||||
<admin>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</admin>
|
||||
<appServer>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<!-- stand-alone instance host/port : will be ignored if sharding or repl-set is on -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled>
|
||||
</sharding>
|
||||
</tercero>
|
||||
</mongodb>
|
||||
<PDO> <!-- aka: mysql, aka mariadb: supports only repl sets/stand-alone, not sharding -->
|
||||
<appServer>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<PDO_master>
|
||||
<db_hostname>namastedb.dev.givingassistant.org</db_hostname>
|
||||
<db_username>gaAdmin</db_username>
|
||||
<db_password>74SI1^0e</db_password>
|
||||
<db_port>3306</db_port>
|
||||
</PDO_master>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<enabled>1</enabled>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<PDO_master>
|
||||
<db_hostname>namastedb.dev.givingassistant.org</db_hostname>
|
||||
<db_username>gaAdmin</db_username>
|
||||
<db_password>74SI1^0e</db_password>
|
||||
<db_port>3306</db_port>
|
||||
<db_database>givva_namaste_warehouse</db_database>
|
||||
</PDO_master>
|
||||
</segundo>
|
||||
</PDO>
|
||||
</database>
|
||||
<!-- the MQ resource definition -->
|
||||
<brokerServices>
|
||||
<vhost>gadev</vhost>
|
||||
<queueTag>gadev_</queueTag>
|
||||
<appServer>
|
||||
<!-- by default, the broker tag defines the PRIME broker resource -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<apiPort>15672</apiPort>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<mBroker>0</mBroker>
|
||||
</Instances>
|
||||
</appServer>
|
||||
<admin>
|
||||
<!-- the administrative service -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<adminBrokerIn>4</adminBrokerIn>
|
||||
</Instances>
|
||||
</admin>
|
||||
<segundo>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<uBroker>2</uBroker>
|
||||
</Instances>
|
||||
</tercero>
|
||||
</brokerServices>
|
||||
|
||||
<!--
|
||||
The migration section only appears in the env.xml file - it should *never* be in the main (namaste.xml) file.
|
||||
In other words, we don't want to commit this data to source as it's only present for the purpose of managing
|
||||
a back-end process...
|
||||
|
||||
Specifically, the migration section deals with data migration and defines the source repository containing
|
||||
the data to be brought into Namaste.
|
||||
|
||||
Currently the only supported schemas are MYSQL and MONGO (as source databases).
|
||||
Additionally, mysql is only imported into mongo and mongo is only imported into mysql.
|
||||
-->
|
||||
<migration>
|
||||
<numRecsInXfer>75</numRecsInXfer> <!-- use this value to bypass namaste record limit -->
|
||||
<numRecsInTest>3</numRecsInTest> <!-- use this value to set the # records to fetch in test mode -->
|
||||
<mysql>
|
||||
<!-- URI of the remote DB service -->
|
||||
<host>development-cluster.cluster-chnkxhe6orzk.us-east-1.rds.amazonaws.com</host>
|
||||
<!-- PORT number of the remote DB -->
|
||||
<port>3306</port>
|
||||
<!-- user login for the remote DB -->
|
||||
<user>gamaster</user>
|
||||
<!-- user pass for the remote DB -->
|
||||
<pass>Development123!</pass>
|
||||
<!-- name of the remote database -->
|
||||
<database>ga_dev</database>
|
||||
<!-- charset of the remote DB -->
|
||||
<db_charset>charset=utf8mb4</db_charset>
|
||||
</mysql>
|
||||
<mongo>
|
||||
<!-- URI of the remote DB service -->
|
||||
<host>development-cluster.cluster-chnkxhe6orzk.us-east-1.rds.amazonaws.com</host>
|
||||
<!-- instance type - must be either: shard, replSet, or standAlone -->
|
||||
<instanceType>standAlone</instanceType>
|
||||
<!-- PORT number of the remote DB -->
|
||||
<port>3306</port>
|
||||
<!-- set to 1 if login required -->
|
||||
<userSec>0</userSec>
|
||||
<!-- where is the user pw stored? -->
|
||||
<authSource>admin</authSource>
|
||||
<!-- user login for the remote DB -->
|
||||
<user>gamaster</user>
|
||||
<!-- user pass for the remote DB -->
|
||||
<pass>Development123!</pass>
|
||||
<!-- name of the remote database -->
|
||||
<database>givva</database>
|
||||
<!-- do not change this... -->
|
||||
<readPreference>primary</readPreference>
|
||||
<!-- or this... -->
|
||||
<!-- cannot be less than 500, a value of 0 => disabled -->
|
||||
<heartbeatFrequencyMS>5000</heartbeatFrequencyMS>
|
||||
<!-- replSet name if replSets used -->
|
||||
<replSetName>none</replSetName>
|
||||
<!-- replSet nodes - minimum = 3! -->
|
||||
<replSetDSN>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
</replSetDSN>
|
||||
<!-- sharding mongos service -->
|
||||
<mongosNodes>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
</mongosNodes>
|
||||
</mongo>
|
||||
</migration>
|
||||
|
||||
<security>
|
||||
<useRestrictedList>0</useRestrictedList>
|
||||
</security>
|
||||
</application>
|
||||
220
deployment/development/dev_env_tercero.xml
Normal file
220
deployment/development/dev_env_tercero.xml
Normal file
@@ -0,0 +1,220 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Remember - this is the development level env.XML definition and values here are expected to
|
||||
overwrite the base XML file.
|
||||
|
||||
This is the config file for the segundo server on:
|
||||
|
||||
namaste.tercero.dev.givingassistant.org
|
||||
|
||||
This file is NOT checked into source-code control.
|
||||
|
||||
|
||||
@author: mike@givingassistant.org
|
||||
@version: 1.0
|
||||
|
||||
HISTORY:
|
||||
========
|
||||
10-30-20 mks original coding
|
||||
|
||||
-->
|
||||
<application>
|
||||
<id>
|
||||
<envName>development</envName> <!-- must be: production, qa, or development -->
|
||||
</id>
|
||||
<syslog>0</syslog> <!-- boolean: enable syslog over console log -->
|
||||
<auditOn>0</auditOn> <!-- enables auditing micro-service overrides template setting -->
|
||||
<journalOn>0</journalOn> <!-- enables journaling micro-service overrides template setting -->
|
||||
<!-- enable when NAMASTE becomes a user-management system...
|
||||
<allowMultipleUserSessions>1</allowMultipleUserSessions>
|
||||
<sessionExpirationRenewal>15</sessionExpirationRenewal> -->
|
||||
<appServer>
|
||||
<isLocal>0</isLocal>
|
||||
</appServer>
|
||||
<tercero>
|
||||
<isLocal>1</isLocal>
|
||||
</tercero>
|
||||
|
||||
<!-- defines the external caching service end-point -->
|
||||
<cache>
|
||||
<server>
|
||||
<hostName>namastedb.dev.givingassistant.org</hostName>
|
||||
<portNum>11211</portNum>
|
||||
<persistentID>development</persistentID>
|
||||
</server>
|
||||
</cache>
|
||||
<!-- defines the database(s) used -->
|
||||
<database>
|
||||
<!-- values can be overwritten by individual schemas - these are the defaults -->
|
||||
<mongodb>
|
||||
<enabled>1</enabled> <!-- if either admin or namaste is enabled, then this must be enabled -->
|
||||
<adminPassword>einstein</adminPassword>
|
||||
<admin>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</admin>
|
||||
<appServer>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<!-- stand-alone instance host/port : will be ignored if sharding or repl-set is on -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<sharding>
|
||||
<enabled>0</enabled> <!-- implies only that you connect to mongos instead of mongod -->
|
||||
</sharding>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<user>gaOwner</user>
|
||||
<password>kc^7P6Sn</password>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>27017</port>
|
||||
<sharding>
|
||||
<enabled>0</enabled>
|
||||
</sharding>
|
||||
</tercero>
|
||||
</mongodb>
|
||||
<PDO> <!-- aka: mysql, aka mariadb: supports only repl sets/stand-alone, not sharding -->
|
||||
<appServer>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<PDO_master>
|
||||
<db_hostname>namastedb.dev.givingassistant.org</db_hostname>
|
||||
<db_username>gaAdmin</db_username>
|
||||
<db_password>74SI1^0e</db_password>
|
||||
<db_port>3306</db_port>
|
||||
</PDO_master>
|
||||
</appServer>
|
||||
<segundo>
|
||||
<enabled>1</enabled>
|
||||
<useReadSecondary>0</useReadSecondary>
|
||||
<PDO_master>
|
||||
<db_hostname>namastedb.dev.givingassistant.org</db_hostname>
|
||||
<db_username>gaAdmin</db_username>
|
||||
<db_password>74SI1^0e</db_password>
|
||||
<db_port>3306</db_port>
|
||||
<db_database>givva_namaste_warehouse</db_database>
|
||||
</PDO_master>
|
||||
</segundo>
|
||||
</PDO>
|
||||
</database>
|
||||
<!-- the MQ resource definition -->
|
||||
<brokerServices>
|
||||
<vhost>gadev</vhost>
|
||||
<queueTag>gadev_</queueTag>
|
||||
<appServer>
|
||||
<!-- by default, the broker tag defines the PRIME broker resource -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<apiPort>15672</apiPort>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<mBroker>0</mBroker>
|
||||
</Instances>
|
||||
</appServer>
|
||||
<admin>
|
||||
<!-- the administrative service -->
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<adminBrokerIn>4</adminBrokerIn>
|
||||
</Instances>
|
||||
</admin>
|
||||
<segundo>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
</segundo>
|
||||
<tercero>
|
||||
<host>namastedb.dev.givingassistant.org</host>
|
||||
<port>5672</port>
|
||||
<user>namaste</user>
|
||||
<pass>Od122dS@</pass>
|
||||
<Instances>
|
||||
<uBroker>2</uBroker>
|
||||
</Instances>
|
||||
</tercero>
|
||||
</brokerServices>
|
||||
|
||||
<!--
|
||||
The migration section only appears in the env.xml file - it should *never* be in the main (namaste.xml) file.
|
||||
In other words, we don't want to commit this data to source as it's only present for the purpose of managing
|
||||
a back-end process...
|
||||
|
||||
Specifically, the migration section deals with data migration and defines the source repository containing
|
||||
the data to be brought into Namaste.
|
||||
|
||||
Currently the only supported schemas are MYSQL and MONGO (as source databases).
|
||||
Additionally, mysql is only imported into mongo and mongo is only imported into mysql.
|
||||
-->
|
||||
<migration>
|
||||
<numRecsInXfer>75</numRecsInXfer> <!-- use this value to bypass namaste record limit -->
|
||||
<numRecsInTest>3</numRecsInTest> <!-- use this value to set the # records to fetch in test mode -->
|
||||
<mysql>
|
||||
<!-- URI of the remote DB service -->
|
||||
<host>development-cluster.cluster-chnkxhe6orzk.us-east-1.rds.amazonaws.com</host>
|
||||
<!-- PORT number of the remote DB -->
|
||||
<port>3306</port>
|
||||
<!-- user login for the remote DB -->
|
||||
<user>gamaster</user>
|
||||
<!-- user pass for the remote DB -->
|
||||
<pass>Development123!</pass>
|
||||
<!-- name of the remote database -->
|
||||
<database>ga_dev</database>
|
||||
<!-- charset of the remote DB -->
|
||||
<db_charset>charset=utf8mb4</db_charset>
|
||||
</mysql>
|
||||
<mongo>
|
||||
<!-- URI of the remote DB service -->
|
||||
<host>development-cluster.cluster-chnkxhe6orzk.us-east-1.rds.amazonaws.com</host>
|
||||
<!-- instance type - must be either: shard, replSet, or standAlone -->
|
||||
<instanceType>standAlone</instanceType>
|
||||
<!-- PORT number of the remote DB -->
|
||||
<port>3306</port>
|
||||
<!-- set to 1 if login required -->
|
||||
<userSec>0</userSec>
|
||||
<!-- where is the user pw stored? -->
|
||||
<authSource>admin</authSource>
|
||||
<!-- user login for the remote DB -->
|
||||
<user>gamaster</user>
|
||||
<!-- user pass for the remote DB -->
|
||||
<pass>Development123!</pass>
|
||||
<!-- name of the remote database -->
|
||||
<database>givva</database>
|
||||
<!-- do not change this... -->
|
||||
<readPreference>primary</readPreference>
|
||||
<!-- or this... -->
|
||||
<!-- cannot be less than 500, a value of 0 => disabled -->
|
||||
<heartbeatFrequencyMS>5000</heartbeatFrequencyMS>
|
||||
<!-- replSet name if replSets used -->
|
||||
<replSetName>none</replSetName>
|
||||
<!-- replSet nodes - minimum = 3! -->
|
||||
<replSetDSN>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
</replSetDSN>
|
||||
<!-- sharding mongos service -->
|
||||
<mongosNodes>
|
||||
<subEntry>HOSTNAME:PORTNUM</subEntry>
|
||||
</mongosNodes>
|
||||
</mongo>
|
||||
</migration>
|
||||
|
||||
<security>
|
||||
<useRestrictedList>0</useRestrictedList>
|
||||
</security>
|
||||
</application>
|
||||
7
deployment/phpconf.ini
Normal file
7
deployment/phpconf.ini
Normal file
@@ -0,0 +1,7 @@
|
||||
memory_limit = 2048M
|
||||
max_execution_time = 0
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_RECOVERABLE_ERROR & ~E_NOTICE
|
||||
timezone = 'America/Los_Angeles'
|
||||
error_log = /var/log/php_errors.log
|
||||
apc.shm_size = 256M
|
||||
extension=mongodb.so
|
||||
24
deployment/run.sh
Normal file
24
deployment/run.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# XXX container is not admin interface we do not need apache do not launch it.
|
||||
set -e
|
||||
# ============================ run apache ============================
|
||||
# if [ -f "/etc/container_environment.sh" ]; then source /etc/container_environment.sh; fi;
|
||||
echo "starting apache"
|
||||
mkdir -p /var/log/apache2
|
||||
chgrp www-data /var/log/apache2
|
||||
chmod g+rwx /var/log/apache2
|
||||
/usr/sbin/apache2ctl -D namaste -k start
|
||||
echo "done"
|
||||
# ========================= start ssh server =========================
|
||||
echo "starting ssh server"
|
||||
service ssh start
|
||||
echo "done"
|
||||
# ============================ run namaste ===========================
|
||||
echo "starting namaste"
|
||||
su app -l -s /bin/bash -c "/usr/bin/php /home/app/scripts/startBrokers.php"
|
||||
echo "done"
|
||||
# XXX sleep forever
|
||||
# while 1:
|
||||
sleep 100000000
|
||||
|
||||
echo "Namaste configuration complete."
|
||||
9
deployment/run_apache.sh
Executable file
9
deployment/run_apache.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# XXX container is not admin interface we do not need apache do not launch it.
|
||||
set -e
|
||||
if [ -f "/etc/container_environment.sh" ]; then source /etc/container_environment.sh; fi;
|
||||
mkdir -p /var/log/apache2
|
||||
chgrp www-data /var/log/apache2
|
||||
chmod g+rwx /var/log/apache2
|
||||
exec /usr/sbin/apache2ctl -D FOREGROUND
|
||||
echo "Apache configuration complete."
|
||||
9
deployment/run_namaste.sh
Executable file
9
deployment/run_namaste.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
if [ -f /etc/container_environment.sh ]; then source /etc/container_environment.sh; fi;
|
||||
# we want to wait until rabbit and mongo container is functional.
|
||||
sleep 20
|
||||
su app -l -s /bin/bash -c "/usr/bin/php /home/app/scripts/startBrokers.php"
|
||||
# XXX sleep forever
|
||||
# while 1:
|
||||
sleep 100000000
|
||||
13
deployment/sshd/sshd_config
Normal file
13
deployment/sshd/sshd_config
Normal file
@@ -0,0 +1,13 @@
|
||||
Protocol 2
|
||||
LogLevel VERBOSE
|
||||
PasswordAuthentication no
|
||||
PubkeyAuthentication yes
|
||||
SyslogFacility AUTH
|
||||
|
||||
# SyslogFacility AUTHPRIV
|
||||
# PermitRootLogin yes
|
||||
# ChallengeResponseAuthentication no
|
||||
# PermitEmptyPasswords yes
|
||||
# UseDNS no
|
||||
# X11Forwarding no
|
||||
# Subsystem sftp /usr/lib/openssh/sftp-server
|
||||
Reference in New Issue
Block a user