Browse Source

Docker - Implement postgresql (#3298)

* First commit

* Exploring docker

* Fixed the mysql issue

* Start of dockerification

* Rustified the TFBReaper

* TFBReaper is now in the base

* Separating parts

* Fixed the java issue

* POC suite hookup

* tee'd output

* Minor fixes

* Vagrant works again

* Started work on --init

* Sets up client
* Starts the setup of the database machines

* Database dockerificationating

* Updated to Ubuntu16.04 and fixed a bug

* Fixed a bug and more dockerication

* Make vagrant work

* Be nicer to travis

* Derp

* Fixed a bunch of bugs

Implemented postgresql
Implemented gemini-postgres

* Fixed a bug with a missing file
Mike Smith 7 years ago
parent
commit
bf69033730
29 changed files with 614 additions and 600 deletions
  1. 0 7
      frameworks/Java/gemini/Docroot/WEB-INF/gemini-mysql.conf
  2. 522 0
      frameworks/Java/gemini/Docroot/WEB-INF/gemini-postgres.conf
  3. 0 43
      frameworks/Java/gemini/Docroot/WEB-INF/gemini.conf
  4. 1 1
      frameworks/Java/gemini/benchmark_config.json
  5. 18 0
      frameworks/Java/gemini/gemini-postgres.dockerfile
  6. 0 3
      frameworks/Java/gemini/gemini.dockerfile
  7. 7 8
      toolset/benchmark/benchmarker.py
  8. 3 3
      toolset/benchmark/framework_test.py
  9. 0 65
      toolset/setup/linux/databases/mysql/create.sql
  10. 0 82
      toolset/setup/linux/databases/mysql/my.cnf
  11. 0 7
      toolset/setup/linux/databases/mysql/mysql.list
  12. 0 40
      toolset/setup/linux/databases/mysql/mysql.sh
  13. 0 4
      toolset/setup/linux/databases/postgresql/create-postgres-database.sql
  14. 0 52
      toolset/setup/linux/databases/postgresql/postgresql.sh
  15. 0 5
      toolset/setup/linux/docker/databases/mysql/create.sql
  16. 3 2
      toolset/setup/linux/docker/databases/mysql/mysql.dockerfile
  17. 0 0
      toolset/setup/linux/docker/databases/postgres/60-postgresql-shm.conf
  18. 3 0
      toolset/setup/linux/docker/databases/postgres/create-postgres-database.sql
  19. 0 6
      toolset/setup/linux/docker/databases/postgres/create-postgres.sql
  20. 0 0
      toolset/setup/linux/docker/databases/postgres/pg_hba.conf
  21. 52 0
      toolset/setup/linux/docker/databases/postgres/postgres.dockerfile
  22. 4 4
      toolset/setup/linux/docker/databases/postgres/postgresql.conf
  23. 1 1
      toolset/setup/linux/docker/java.dockerfile
  24. 0 12
      toolset/setup/linux/languages/java.sh
  25. 0 12
      toolset/setup/linux/systools/ant.sh
  26. 0 28
      toolset/setup/linux/webservers/resin/resin-java8.sh
  27. 0 165
      toolset/setup/linux/webservers/resin/resin.properties
  28. 0 28
      toolset/setup/linux/webservers/resin/resin.sh
  29. 0 22
      toolset/setup/linux/webservers/resin/resin.xml

+ 0 - 7
frameworks/Java/gemini/Docroot/WEB-INF/gemini-mysql.conf

@@ -91,13 +91,6 @@ db.ConnectString = TFB-database:3306/hello_world?jdbcCompliantTruncation=false&e
 db.LoginName = benchmarkdbuser
 db.LoginPass = benchmarkdbpass
 
-# JTDS (Open source JDBC driver for Microsoft SQL Server)
-#db.Driver.Class = org.postgresql.Driver
-#db.Driver.UrlPrefix = jdbc:postgresql://
-#db.Driver.SupportsAbsolute = yes
-#db.Driver.SupportsGetRow = yes
-#db.Driver.Jdbc1 = no
-
 # db.Driver.Pooling
 #   How many Connections to maintain to the database.  The default is 1.
 # db.Driver.MaxPooling

+ 522 - 0
frameworks/Java/gemini/Docroot/WEB-INF/gemini-postgres.conf

@@ -0,0 +1,522 @@
+# -----------------------------------------------------------------------
+# GEMINIHELLO configuration file
+#
+# BASELINE Configuration
+#
+# This configuration file specifies application default behavior that is
+# suitable where not superseded by deployment-specific configuration
+# files.  Refer to the separate deployment-specific configuration files
+# (such as GeminiHello-Dev.conf).
+#
+# The automatically-generated configuration files align with generic
+# deployment "roles" (Development, Test, and Production).  It is common
+# practice, however, to have additional machine-specific configuration 
+# files.  This allows for configuration attributes to be distributed
+# between so that, for example, all development environments can use
+# attributes specific in a Development configuration file.  For example:
+#
+#    GeminiHello.conf - Baseline configuration
+#    GeminiHello-Dev.conf - Standard development configuration specifics
+#    GeminiHello-BLACKPARK.conf - Specifics for a machine named Blackpark.
+#
+# -----------------------------------------------------------------------
+#
+# AUTO GENERATED CONFIGURATION FILE NOTICE:
+#   Search for lines that contain "EDIT THIS" for AUTO-GENERATED items
+#   that you cam edit for additional functionality.
+#
+# Notes:
+#   Lines that begin with # are comments.  Empty lines are ignored.  Each
+#   entry in this file is described immediately above the provided value.
+#
+#   Directories must have their back-slashes (\) escaped as \\.
+#
+# -----------------------------------------------------------------------
+#
+# STANDARD PROPERTIES
+#   Gemini provides the following standard properties dynamically at
+#   runtime, derived from the deployment environment.
+#
+#   All Servlet Initialization Parameters in the following form:
+#   Servlet.Parameter.(ParamName) = (Value)
+#
+#   All Server Attributes in the following form:
+#   Servlet.Attribute.(AttribtueName) = (Value)
+#
+#   Servlet.ContextName - The deployment context name for the web-app.
+#   Servlet.DeploymentRoot - The physical file system location for the
+#     "document root" of the web-app.
+#   Servlet.WebInf - The physical file system location of the web-app's
+#     WEB-INF directory.
+#   Servlet.MachineName - The discovered machine name of the server.
+#   Servlet.ApplicationRoot - One directory above the DeploymentRoot.
+#
+# -----------------------------------------------------------------------
+
+# -----------------------------------------------------------------------
+# DEPLOYMENT SETTINGS
+# -----------------------------------------------------------------------
+
+# ApplicationRoot
+#   Specifies the file system root of the application.  This value is
+#   not actually used by Gemini, but is used as a macro in several
+#   other property values.
+
+ApplicationRoot = ${Servlet.ApplicationRoot}
+
+# DeploymentDescription
+#   A simple descriptive name or label for this deployment of the
+#   application (e.g., Production, Test, Development, and so on).  This
+#   description is used to identify the installation in some system-
+#   generated messages such as exception report e-mails.
+
+DeploymentDescription = Production
+
+
+# -----------------------------------------------------------------------
+# DATABASE SETTINGS
+# -----------------------------------------------------------------------
+
+# Connection information can be found in the separate deployment-
+# specific configuration files.
+
+# JTDS (Open source JDBC driver for Microsoft SQL Server)
+db.Driver.Class = org.postgresql.Driver
+db.Driver.UrlPrefix = jdbc:postgresql://
+db.Driver.SupportsAbsolute = yes
+db.Driver.SupportsGetRow = yes
+db.Driver.Jdbc1 = no
+
+db.ConnectString = TFB-database:5432/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true&useSSL=false
+db.LoginName = benchmarkdbuser
+db.LoginPass = benchmarkdbpass
+
+# db.Driver.Pooling
+#   How many Connections to maintain to the database.  The default is 1.
+# db.Driver.MaxPooling
+#   How many concurrent Connections to allow at maximum.
+
+db.Driver.Pooling = 256
+db.Driver.MaxPooling = 256
+
+# BasicConnectionListener properties
+
+# cl.RetriesOnDisconnect
+#   How many automatic retries on database connection (socket) failures
+#   should be made before aborting a query attempt?
+
+cl.RetriesOnDisconnect = 1
+
+# cl.AlertFile
+#   File to write database connector alerts to.
+
+cl.AlertLogFile = ${ApplicationRoot}/jdbc-alerts.log
+
+
+# -----------------------------------------------------------------------
+# CLUSTER SETTINGS
+# -----------------------------------------------------------------------
+
+# The cluster settings are left commented here.  Gemini clustering can
+# be enabled either (a) by defining cluster connectivity information here
+# in a configuration file or (b) by having application instances fetch
+# their configuration from the cluster master.  In case (b), this
+# configuration file won't be used and there's no point in un-commenting
+# and modifying the lines below.
+
+#ClusterClient.TransportClassname = com.techempower.gemini.cluster.transport.kryonet.KryoClientTransport
+#ClusterClient.Authentication.Key = shared-secret
+#Kryo.Client.Host = localhost
+#Kryo.Client.TcpPort = 54555
+
+
+# -----------------------------------------------------------------------
+# DIRECTORY SETTINGS
+# -----------------------------------------------------------------------
+
+# JSPDirectory
+#   Specifies the relative URL base for JSP files.
+
+JSPDirectory = /WEB-INF/jsp/
+
+# JSPPhysicalDirectory
+#   Specifies the physical directory that is referenced by JSPDirectory
+#   above.
+
+JSPPhysicalDirectory = ${Servlet.WebInf}/jsp/
+
+# HTMLDirectory
+#   Specifies the relative URL base for HTML files.  If HTML files are
+#   served by a separate host, an asbolute URL base can be specified.
+
+HTMLDirectory = /html/
+
+# ImagesDirectory
+#   Specifies the relative URL base for image files.  If images are
+#   served by a separate host, an asbolute URL base can be specified.
+
+ImageDirectory = /images/
+
+# CSSDirectory
+#   Specifies the relative URL base for style sheet files.  If CSS 
+#   files are served by a separate host, an asbolute URL base can be
+#   specified.
+
+CSSDirectory = /css/
+
+# JavaScriptDirectory
+#   Specifies the relative URL base for JavaScript (.js) files.  If
+#   JS files are served by a separate host, an asbolute URL base can be
+#   specified.
+
+JavaScriptDirectory = /js/
+
+# ServletURL
+#   Specifies the relative URL for the dispatcher servlet.  For many
+#   applications, this will be set to the root (just /).  This requires
+#   that the application server direct request to the Servlet only when
+#   the URL matches the root and the root only.  In Resin, the way
+#   this is accomplished is by setting a Servlet Mapping as below:
+#     <servlet-mapping url-regexp='^/$' servlet-name='...'/>
+
+ServletURL = /
+
+
+# -----------------------------------------------------------------------
+# LOGGING SETTINGS
+# -----------------------------------------------------------------------
+
+# Log.File - Log file settings
+# Log.File.On
+#   Enables or disables logging to log files.
+# Log.Console.On
+#   Enables or disables logging to the console.
+
+Log.File.On = no
+Log.Console.On = yes
+
+# Log.File.LogDirectory
+#   Specifies the directory to which logfiles should be written.  By
+#   default this is just a subdirectory named "logs" off of whatever
+#   is the active directory.  The directory must exist for the log files
+#   to work.
+
+Log.File.LogDirectory = ${ApplicationRoot}/Logs/
+
+# Log.File.LogDebugThreshold -and-
+# Log.Console.LogDebugThreshold
+#   Specify the minimum log level (0 to 100, inclusive) to require for
+#   writing items to this log listener.
+#
+# 20 is recommended to start out.
+
+Log.File.LogDebugThreshold = 20
+Log.Console.LogDebugThreshold = 20
+
+
+# -----------------------------------------------------------------------
+# IP/DNS/URL SETTINGS
+# -----------------------------------------------------------------------
+
+# StandardDomain
+#   Species the URL base for the standard (non-secure) domain name.
+#   This should not end with a trailing /, which would otherwise be
+#   standard practice.
+
+# TODO: EDIT THIS
+StandardDomain = http://${Servlet.MachineName}
+
+# SecureDomain
+#   Specifies the URL base for the secure (SSL) domain name.
+#   This should not end with a trailing /, which would otherwise be
+#   standard practice.
+
+# TODO: EDIT THIS
+SecureDomain = https://${Servlet.MachineName}
+
+
+# -----------------------------------------------------------------------
+# LOGIN HANDLER
+# -----------------------------------------------------------------------
+
+# LoginHandler.CmdLogin
+#   The command to recognize for the login page (default: "login"). The
+#   login page can be invoked directly via this command or via a peer
+#   Handler, such as subclasses of SecureHandler.
+
+LoginHandler.CmdLogin = login
+
+# LoginHandler.CmdLogout
+#   The command to recognize for logout requests. The default is
+#   "logout".
+
+LoginHandler.CmdLogout = logout
+
+# LoginHandler.CmdPostLogin
+#   The command to redispatch to after a successful login. This command
+#   will only be used if a prior request was not preempted by a forced
+#   login. The default is "home".
+
+LoginHandler.CmdPostLogin = home
+
+# LoginHandler.JspLogin
+#   The JSP page name to use for rendering the login form. The default
+#   is "login.jsp" within the root of your application's JSP directory.
+
+LoginHandler.JspLogin = accounts/login.jsp
+
+# LoginHandler.JspLogout
+#   The JSP page name to use for rendering the logout screen. The default
+#   is "logout.jsp" within the root of your application's JSP directory.
+
+LoginHandler.JspLogout = accounts/logout.jsp
+
+# LoginHandler.CookieNameSuffix - You can change the suffix of the cookie
+#   name used to save automatic login credentials. The default is
+#   "-automatic-login".
+
+LoginHandler.CookieNameSuffix = -automatic-login
+
+# LoginHandler.LogoutDeletesCookie
+#   Delete automatic login cookie after logout.
+
+LoginHandler.LogoutDeletesCookie = yes
+
+# LoginHandler.EmailTemplateName
+#   You can change the template name of the e-mail used to send a user a
+#   replacement password (in the event that they forget their current
+#   password). The default template name is "E-NewPassword".
+
+LoginHandler.EmailTemplateName = E-NewPassword
+
+# LoginHandler.FailedAttemptLimit
+#   Limits the number of sequential failed attempts before an IP address
+#   cannot make any further login attempts (until a timeout period has
+#   expired).
+
+LoginHandler.FailedAttemptLimit = 25
+
+# LoginHandler.FailedResetSeconds
+#   An interval of time after which an IP address that had been blocked
+#   will be permitted to login again.
+
+LoginHandler.FailedResetSeconds = 60
+
+
+# -----------------------------------------------------------------------
+# STANDARD ADMIN SETTINGS
+# -----------------------------------------------------------------------
+
+# Admin.RelativeJspPath
+#   Specifies the relative path to JSP files for the Admin section.
+
+Admin.RelativeJspPath = admin/
+
+# Admin.ScratchEnabled
+#   Should the admin section allow the execution of arbitrary JSP 
+#   fragments?
+
+Admin.ScratchEnabled = no
+
+# Admin.ScratchIP
+#   If scratches are enabled, from what IPs are they permitted?
+
+Admin.ScratchIP = 127.0.0.1,172.16.98.14
+
+
+# -----------------------------------------------------------------------
+# PYXIS USERS AND GROUPS SETTINGS
+# -----------------------------------------------------------------------
+
+# Pyxis.UsersTable
+#   The name of the Users table for this database.
+Pyxis.UsersTable = GhUsers
+
+# Pyxis.GroupsTable
+#   The name of the Groups table for this database.
+Pyxis.GroupsTable = GhGroups
+
+# Pyxis.UsersToGroupsTable
+#   The name of the table mapping Users to Groups for this database.
+Pyxis.UsersToGroupsTable = MapUserToGroup
+
+# BasicSecurity.PasswordCryptographer
+#   Specifies the fully-qualified classname of a PasswordCryptographer
+#   implementation that can hash user passwords.  A common implementation
+#   is com.techempower.security.BCryptPasswordCryptographer.
+BasicSecurity.PasswordCryptographer = com.techempower.security.BCryptPasswordCryptographer
+
+
+# -----------------------------------------------------------------------
+# JSP PRECOMPILATION (optional; not enabled in this auto-generated file)
+# -----------------------------------------------------------------------
+
+# Precomp.Group1
+#   Defines a comma-separated list of directories (relative URLs) that
+#   contain JSP files (relative to the JSPDirectory).  Multiple groups
+#   can be defined as Group2; Group3; etc.
+#   ex. Precomp.Group1 = /,/includes/,/admin/
+
+#Precomp.Group1 = /
+
+# Precomp.AuthorizedIP
+#   An IP address that is authorized to invoke the Precompilation
+#   process.
+
+#Precomp.AuthorizedIP = 65.115.126.13
+
+
+# -----------------------------------------------------------------------
+# MAIL SETTINGS
+# -----------------------------------------------------------------------
+
+# MailServerCount
+#   The number of mail servers to use in fail-over.  If no fail-over is
+#   used, this should be 1.
+
+MailServerCount = 1
+
+# EmailerThreadsDaemon
+#   Set to no to force e-mail servicer threads to completely deliver their
+#   queues even when the application stops.  Set to yes to allow threads
+#   to stop immediately when the application stops, resulting in the
+#   possibility of undelivered e-mails.
+
+EmailerThreadsDaemon = yes
+
+# Mail Server blocks (where 'X' is a sequential ID of the mail servers
+# used by the application).
+#
+# MailServerX.ServerAddress
+#   Specify each mail server's DNS name or IP address.  Make sure the
+#   mail server will relay e-mail for this application.
+# MailServerX.SmtpPort
+#   Specify an SMTP port number if used for Outbound mail.
+# MailServerX.PopPort
+#   Specify a POP3 port number if used for Inbound mail.
+# MailServerX.Username
+#   Used if an SMTP username is required to send or receive mail
+# MailServerX.Password
+#   The password for the user specified above
+# MailServerX.Role
+#   Outbound, Inbound, or Both
+
+# No mail servers specified in baseline configuration.  See environment-
+# specific configuration files.
+#MailServer1.ServerAddress = mail.techempower.com
+#MailServer1.SmtpPort = 25
+#MailServer1.Username = username
+#MailServer1.Password = password
+#MailServer1.ServerRole = Outbound
+
+# FromEmailAddress
+#   The e-mail address to use as an "author" when sending e-mails.
+
+FromEmailAddress = [email protected]
+
+
+# -----------------------------------------------------------------------
+# ERROR HANDLING SETTINGS
+# -----------------------------------------------------------------------
+
+# Should exceptions caught by the Gemini infrastructure while handling
+# web requests be written to the log file?
+
+BasicExceptionHandler.LogExceptions = yes
+BasicExceptionHandler.LogStackTraces = yes
+
+# Should the stack trace of exceptions caught by the Gemini
+# Infrastructure be clearly visible to users?  This is generally
+# acceptable only in a development environment.  In a Production
+# environment, set this value to 'no'.  Stack traces will still be
+# visible within the HTML source sent to the client.
+
+BasicExceptionHandler.RevealStackTrace = no
+
+# BasicExceptionHandler.ErrorPage
+#   Specifies the filename of the error page that should be rendered
+#   to display an exception.  If empty, the internal "page" will be
+#   used.
+
+BasicExceptionHandler.ErrorPage = error-page.jsp
+
+# Feature.exc-email
+# (Formerly EmailExceptionHandler.Enabled)
+#   The EmailExceptionHandler can be enabled or disabled.
+
+Feature.exc-email = false
+
+# EmailExceptionHandler.ToEmailAddress
+#   The e-mail address to which to send exception reports.
+
+EmailExceptionHandler.ToEmailAddress = [email protected]
+
+# EmailExceptionHandler.FromEmailAddress
+#   The e-mail address from which to send exception reports.
+
+EmailExceptionHandler.FromEmailAddress = [email protected]
+
+# EmailExceptionHandler.MinimumInterval
+#   The minimum number of seconds that must pass since the previous
+#   exception report in order to allow another report to be sent.  This
+#   helps mitigate an avalanche of reports from a critical error.  The
+#   interval is specified in seconds.  A good default is 600 (10
+#   minutes).
+
+EmailExceptionHandler.MinimumInterval = 600
+
+
+# -----------------------------------------------------------------------
+# MISCELLANEOUS SETTINGS
+# -----------------------------------------------------------------------
+
+# Character encoding settings
+#
+# Encoding.RequestCharset
+#   What character encoding are we expecting for requests?
+# Encoding.ResponseType
+#   The full MIME-Type name for responses.
+
+Encoding.RequestCharset = UTF-8
+Encoding.ResponseType = text/html;charset=utf-8
+
+# RequestCounting
+#   Specifies that requests should be counted and that threads
+#   processing requests should be assigned names that include the
+#   request ID number for the scope of the request.
+
+RequestCounting = yes
+
+# SchedulerSleepSeconds
+#   Seconds to sleep between scheduler checks.
+
+SchedulerSleepSeconds = 10
+
+# SessionTimeout
+#   Sets the number of seconds before a session should time out on
+#   the web site.
+
+SessionTimeout = 3600
+
+# SessionTracking
+#   If enabled, sessions will be tracked.  This allows the application
+#   to get a count of active sessions.
+
+SessionTracking = Yes
+
+# ThreadDump.DumpOnStopLocation
+#   Specifies a file system location to write thread dump text files
+#   when the application is unloaded by the application server (such
+#   as when the server stops).
+
+ThreadDump.DumpOnStopLocation = ${ApplicationRoot}/Thread Dumps/
+
+# Robots.File
+#   Specifies the file that should be returned when /robots.txt is 
+#   requested.  See hello.home.RobotsHandler.
+
+Robots.File = ${Servlet.WebInf}/robots-disallowed.txt
+
+# Feature.monitor
+#   Set to yes to enable performance monitoring
+Feature.monitor = no

+ 0 - 43
frameworks/Java/gemini/Docroot/WEB-INF/gemini.conf

@@ -79,49 +79,6 @@ DeploymentDescription = Production
 
 db.Enabled = false
 
-# Connection information can be found in the separate deployment-
-# specific configuration files.
-
-# MySQL/ConnectorJ
-# db.Driver.Class = com.mysql.jdbc.Driver
-# db.Driver.UrlPrefix = jdbc:mysql://
-# db.Driver.SupportsAbsolute = yes
-# db.Driver.SupportsGetRow = yes
-# db.Driver.Jdbc1 = no
-
-# db.ConnectString = 10.0.2.15:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true&useSSL=false
-# db.LoginName = benchmarkdbuser
-# db.LoginPass = benchmarkdbpass
-
-# JTDS (Open source JDBC driver for Microsoft SQL Server)
-#db.Driver.Class = org.postgresql.Driver
-#db.Driver.UrlPrefix = jdbc:postgresql://
-#db.Driver.SupportsAbsolute = yes
-#db.Driver.SupportsGetRow = yes
-#db.Driver.Jdbc1 = no
-
-# db.Driver.Pooling
-#   How many Connections to maintain to the database.  The default is 1.
-# db.Driver.MaxPooling
-#   How many concurrent Connections to allow at maximum.
-
-# db.Driver.Pooling = 256
-# db.Driver.MaxPooling = 256
-
-# BasicConnectionListener properties
-
-# cl.RetriesOnDisconnect
-#   How many automatic retries on database connection (socket) failures
-#   should be made before aborting a query attempt?
-
-cl.RetriesOnDisconnect = 1
-
-# cl.AlertFile
-#   File to write database connector alerts to.
-
-cl.AlertLogFile = ${ApplicationRoot}/jdbc-alerts.log
-
-
 # -----------------------------------------------------------------------
 # CLUSTER SETTINGS
 # -----------------------------------------------------------------------

+ 1 - 1
frameworks/Java/gemini/benchmark_config.json

@@ -46,7 +46,7 @@
         "versus": "servlet"
       },
       "postgres": {
-        "setup_file": "start_postgresql",
+        "setup_file": "gemini-postgres.dockerfile",
         "db_url": "/db",
         "query_url": "/query?queries=",
         "cached_query_url": "/cached_query?queries=",

+ 18 - 0
frameworks/Java/gemini/gemini-postgres.dockerfile

@@ -0,0 +1,18 @@
+FROM resin:latest
+
+RUN apt-get install -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
+    ant
+
+ADD Docroot/ /gemini/Docroot
+ADD Source/ /gemini/Source
+ADD build.xml /gemini/
+ADD ivy.xml /gemini/
+ADD ivysettings.xml /gemini/
+
+RUN cd /gemini/Docroot/WEB-INF; mv gemini-postgres.conf GeminiHello.conf;
+
+RUN cd /gemini; mkdir -p Docroot/WEB-INF/classes; mkdir -p Docroot/WEB-INF/lib; ant resolve; ant compile
+
+EXPOSE 8080
+
+CMD ["resinctl", "-conf", "/gemini/Docroot/WEB-INF/resin.xml", "console"]

+ 0 - 3
frameworks/Java/gemini/gemini.dockerfile

@@ -1,8 +1,5 @@
 FROM resin:latest
 
-RUN apt-get install -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
-    ant
-
 ADD Docroot/ /gemini/Docroot
 ADD Source/ /gemini/Source
 ADD build.xml /gemini/

+ 7 - 8
toolset/benchmark/benchmarker.py

@@ -574,7 +574,8 @@ class Benchmarker:
                 if test.database != "None":
                     # TODO: this is horrible... how should we really do it?
                     ports = {
-                        "mysql": 3306
+                        "mysql": 3306,
+                        "postgres": 5432
                     }
                     database_container_id = self.__setup_database_container(test.database.lower(), ports[test.database.lower()])
 
@@ -583,7 +584,7 @@ class Benchmarker:
                 ##########################
                 result = test.start(out)
                 if result != 0:
-                    self.__stop_test(test, out)
+                    self.__stop_test(database_container_id, test, out)
                     time.sleep(5)
                     out.write( "ERROR: Problem starting {name}\n".format(name=test.name) )
                     out.flush()
@@ -617,8 +618,7 @@ class Benchmarker:
                 # Stop this test
                 ##########################
                 self.__stop_test(database_container_id, test, out)
-                if test.database != "None":
-                    self.__stop_database(database_container_id, out)
+                self.__stop_database(database_container_id, out)
 
                 out.write(header("Stopped %s" % test.name))
                 out.flush()
@@ -656,8 +656,7 @@ class Benchmarker:
                     return sys.exit(1)
             except KeyboardInterrupt:
                 self.__stop_test(database_container_id, test, out)
-                if test.database is not None:
-                    self.__stop_database(database_container_id, out)
+                self.__stop_database(database_container_id, out)
             except (OSError, IOError, subprocess.CalledProcessError) as e:
                 self.__write_intermediate_results(test.name,"<setup.py> raised an exception")
                 out.write(header("Subprocess Error %s" % test.name))
@@ -699,8 +698,8 @@ class Benchmarker:
                         slept += 1
                         docker_id = subprocess.check_output(["docker", "ps", "-q"]).strip()
                     # We still need to sleep a bit before removing the image
-                    # time.sleep(5)
-                    # subprocess.check_output(["docker", "image", "rm", test.name])
+                    time.sleep(5)
+                    subprocess.check_output(["docker", "image", "rm", "tfb-test-%s" % test.name])
     ############################################################
     # End __stop_test
     ############################################################

+ 3 - 3
toolset/benchmark/framework_test.py

@@ -278,7 +278,7 @@ class FrameworkTest:
               tee_output(prefix, line)
           except setup_util.EndOfStream:
             break
-      p = subprocess.Popen(["docker", "build", "-f", test_docker_file, "-t", self.name, self.directory],
+      p = subprocess.Popen(["docker", "build", "-f", test_docker_file, "-t", "tfb-test-%s" % self.name, self.directory],
           stdout=subprocess.PIPE,
           stderr=subprocess.STDOUT)
       nbsr = setup_util.NonBlockingStreamReader(p.stdout)
@@ -295,7 +295,7 @@ class FrameworkTest:
     ##########################
     # Run the Docker container
     ##########################
-    p = subprocess.Popen(["docker", "run", "--rm", "-p", "%s:%s" % (self.port, self.port), "--network=host", self.name],
+    p = subprocess.Popen(["docker", "run", "--rm", "-p", "%s:%s" % (self.port, self.port), "--network=host", "tfb-test-%s" % self.name],
           stdout=subprocess.PIPE,
           stderr=subprocess.STDOUT)
     nbsr = setup_util.NonBlockingStreamReader(p.stdout,
@@ -356,7 +356,7 @@ class FrameworkTest:
       p.poll(), self.port, self.benchmarker.is_port_bound(self.port), time_remaining))
     retcode = (p.poll() if p.poll() is not None else 0 if self.benchmarker.is_port_bound(self.port) else 1)
     if p.poll() is not None:
-      tee_output(prefix, "Docker run process exited naturally with %s\n" % (self.setup_file, p.poll()))
+      tee_output(prefix, "Docker run process exited naturally with %s\n" % p.poll())
     elif self.benchmarker.is_port_bound(self.port):
       tee_output(prefix, "Bound port detected on %s\n" % self.port)
 

+ 0 - 65
toolset/setup/linux/databases/mysql/create.sql

@@ -1,65 +0,0 @@
-# To maintain consistency across servers and fix a problem with the jdbc per
-# http://stackoverflow.com/questions/37719818/the-server-time-zone-value-aest-is-unrecognized-or-represents-more-than-one-ti
-SET GLOBAL time_zone = '+00:00';
-
-# modified from SO answer http://stackoverflow.com/questions/5125096/for-loop-in-mysql
-DROP DATABASE IF EXISTS hello_world;
-CREATE DATABASE hello_world;
-USE hello_world;
-
-DROP TABLE IF EXISTS world;
-CREATE TABLE  world (
-  id int(10) unsigned NOT NULL auto_increment,
-  randomNumber int NOT NULL default 0,
-  PRIMARY KEY  (id)
-)
-ENGINE=INNODB;
-GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'%' IDENTIFIED BY 'benchmarkdbpass';
-GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'localhost' IDENTIFIED BY 'benchmarkdbpass';
-
-DROP PROCEDURE IF EXISTS load_data;
-
-DELIMITER #
-CREATE PROCEDURE load_data()
-BEGIN
-
-declare v_max int unsigned default 10000;
-declare v_counter int unsigned default 0;
-
-  TRUNCATE TABLE world;
-  START TRANSACTION;
-  while v_counter < v_max do
-    INSERT INTO world (randomNumber) VALUES ( floor(0 + (rand() * 10000)) );
-    SET v_counter=v_counter+1;
-  end while;
-  commit;
-END #
-
-DELIMITER ;
-
-CALL load_data();
-
-DROP TABLE IF EXISTS fortune;
-CREATE TABLE  fortune (
-  id int(10) unsigned NOT NULL auto_increment,
-  message varchar(2048) CHARACTER SET 'utf8' NOT NULL,
-  PRIMARY KEY  (id)
-)
-ENGINE=INNODB;
-GRANT SELECT ON hello_world.fortune TO 'benchmarkdbuser'@'%' IDENTIFIED BY 'benchmarkdbpass';
-GRANT SELECT ON hello_world.fortune TO 'benchmarkdbuser'@'localhost' IDENTIFIED BY 'benchmarkdbpass';
-
-INSERT INTO fortune (message) VALUES ('fortune: No such file or directory');
-INSERT INTO fortune (message) VALUES ('A computer scientist is someone who fixes things that aren''t broken.');
-INSERT INTO fortune (message) VALUES ('After enough decimal places, nobody gives a damn.');
-INSERT INTO fortune (message) VALUES ('A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
-INSERT INTO fortune (message) VALUES ('A computer program does what you tell it to do, not what you want it to do.');
-INSERT INTO fortune (message) VALUES ('Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
-INSERT INTO fortune (message) VALUES ('Any program that runs right is obsolete.');
-INSERT INTO fortune (message) VALUES ('A list is only as strong as its weakest link. — Donald Knuth');
-INSERT INTO fortune (message) VALUES ('Feature: A bug with seniority.');
-INSERT INTO fortune (message) VALUES ('Computers make very fast, very accurate mistakes.');
-INSERT INTO fortune (message) VALUES ('<script>alert("This should not be displayed in a browser alert box.");</script>');
-INSERT INTO fortune (message) VALUES ('フレームワークのベンチマーク');
-
-FLUSH PRIVILEGES;

+ 0 - 82
toolset/setup/linux/databases/mysql/my.cnf

@@ -1,82 +0,0 @@
-#######################
-# client              #
-#######################
-
-[client]
-port            = 3306
-socket          = /var/run/mysqld/mysqld.sock
-
-#######################
-# mysqld              #
-#######################
-
-[mysqld]
-#
-# * Basic Settings
-#
-default-storage-engine = innodb
-
-user            = mysql
-pid-file        = /var/run/mysqld/mysqld.pid
-socket          = /var/run/mysqld/mysqld.sock
-port            = 3306
-skip-external-locking
-skip-name-resolve
-lower_case_table_names = 1
-
-character-set-server=utf8
-collation-server=utf8_general_ci
-
-#
-# * Fine Tuning
-#
-
-key_buffer_size         = 16M
-max_allowed_packet      = 16M
-thread_stack            = 256K
-thread_cache_size       = 128
-max_connections         = 5000
-back_log                = 5000
-table_open_cache        = 800
-table_definition_cache  = 800
-max_heap_table_size     = 128M
-tmp_table_size          = 128M
-
-#
-# monitoring off
-#
-
-performance-schema = false
-
-#
-# innodb settings
-#
-
-innodb_use_native_aio   = 1
-# sync for every sec. not for every commit.
-innodb_flush_log_at_trx_commit = 2
-innodb_flush_method=O_DIRECT
-innodb_buffer_pool_instances=14
-
-sync_binlog=0
-
-#
-# * Query Cache Configuration
-#
-query_cache_type         = 0
-#query_cache_limit        = 1M
-#query_cache_size         = 64M
-#query_cache_size = 0
-#query_cache_min_res_unit = 1K
-max_prepared_stmt_count  = 1048576
-
-#######################
-# mysqldump           #
-#######################
-
-[mysqldump]
-quick
-quote-names
-max_allowed_packet      = 16M
-
-!includedir /etc/mysql/conf.d/

+ 0 - 7
toolset/setup/linux/databases/mysql/mysql.list

@@ -1,7 +0,0 @@
-# You may comment out entries below, but any other modifications may be lost.
-# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
-deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-apt-config
-deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7
-deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-tools
-#deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-tools-preview
-deb-src http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7

+ 0 - 40
toolset/setup/linux/databases/mysql/mysql.sh

@@ -1,40 +0,0 @@
-#!/bin/bash
-
-fw_depends databases
-
-fw_installed mysql && return 0
-
-# send over the required files
-scp $FWROOT/toolset/setup/linux/databases/mysql/create.sql $DBHOST:~/
-scp $FWROOT/toolset/setup/linux/databases/mysql/my.cnf $DBHOST:~/
-scp $FWROOT/toolset/setup/linux/databases/mysql/mysql.list $DBHOST:~/
-
-# install mysql on database machine
-ssh $DBHOST 'bash' <<EOF
-sudo cp mysql.list /etc/apt/sources.list.d/
-sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C718D3B5072E1F5
-sudo apt-get update
-sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/data-dir select 'Y'"
-sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password secret"
-sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/re-root-pass password secret"
-sudo DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-server
-
-sudo service mysql stop
-
-sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.orig
-sudo cp my.cnf /etc/mysql/my.cnf
-
-sudo rm -rf /ssd/mysql
-sudo rm -rf /ssd/log/mysql
-sudo cp -R -p /var/lib/mysql /ssd/
-sudo cp -R -p /var/log/mysql /ssd/log
-sudo service mysql start
-EOF
-
-echo -e "ssh \$DBHOST 'bash' <<EOF" > $IROOT/mysql.installed
-echo -e "sudo service mysql start || echo 'mysql service already started'" >> $IROOT/mysql.installed
-echo -e "mysqladmin -uroot -psecret flush-hosts" >> $IROOT/mysql.installed
-echo -e "mysql -uroot -psecret < create.sql" >> $IROOT/mysql.installed
-echo -e "EOF" >> $IROOT/mysql.installed
-
-source $IROOT/mysql.installed

+ 0 - 4
toolset/setup/linux/databases/postgresql/create-postgres-database.sql

@@ -1,4 +0,0 @@
-CREATE USER benchmarkdbuser WITH PASSWORD 'benchmarkdbpass';
-
-DROP DATABASE IF EXISTS hello_world;
-CREATE DATABASE hello_world WITH ENCODING 'UTF8';

+ 0 - 52
toolset/setup/linux/databases/postgresql/postgresql.sh

@@ -1,52 +0,0 @@
-#!/bin/bash
-
-fw_depends databases
-
-fw_installed postgresql && return 0
-
-# delete any old required files that do not belong to us as
-# scp will fail otherwise
-ssh $DBHOST 'bash' <<EOF
-  sudo rm -rf create-postgres-database.sql
-  sudo rm -rf create-postgres.sql
-EOF
-
-# send over the required files
-scp $FWROOT/toolset/setup/linux/databases/postgresql/postgresql.conf $DBHOST:~/
-scp $FWROOT/toolset/setup/linux/databases/postgresql/pg_hba.conf $DBHOST:~/
-scp $FWROOT/toolset/setup/linux/databases/postgresql/60-postgresql-shm.conf $DBHOST:~/
-scp $FWROOT/toolset/setup/linux/databases/postgresql/create-postgres-database.sql $DBHOST:~/
-scp $FWROOT/toolset/setup/linux/databases/postgresql/create-postgres.sql $DBHOST:~/
-
-ssh $DBHOST 'bash' <<EOF
-# install postgresql on database machine
-sudo apt-get -y update
-sudo apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" postgresql
-
-# This will support all 9.* versions depending on the machine
-service postgresql status &> /dev/null && sudo service postgresql stop
-# Because postgresql...
-sudo killall -9 -u postgres
-
-# Make sure all the configuration files in main belong to postgres
-PG_VERSION=`pg_config --version | grep -oP '\d\.\d'`
-sudo mv postgresql.conf /etc/postgresql/\${PG_VERSION}/main/postgresql.conf
-sudo mv pg_hba.conf /etc/postgresql/\${PG_VERSION}/main/pg_hba.conf
-
-sudo chown -Rf postgres:postgres /etc/postgresql/\${PG_VERSION}/main
-
-sudo rm -rf /ssd/postgresql
-sudo cp -R -p /var/lib/postgresql/\${PG_VERSION}/main /ssd/postgresql
-sudo mv 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf
-
-sudo chown postgres:postgres /etc/sysctl.d/60-postgresql-shm.conf
-sudo chown postgres:postgres create-postgres*
-EOF
-
-echo -e "ssh \$DBHOST <<EOF" > $IROOT/postgresql.installed
-echo "service postgresql status &> /dev/null || sudo service postgresql start" >> $IROOT/postgresql.installed
-echo "sudo -u postgres psql -q template1 < create-postgres-database.sql" >> $IROOT/postgresql.installed
-echo "sudo -u postgres psql -q hello_world < create-postgres.sql" >> $IROOT/postgresql.installed
-echo "EOF" >> $IROOT/postgresql.installed
-
-source $IROOT/postgresql.installed

+ 0 - 5
toolset/setup/linux/docker/databases/mysql/create.sql

@@ -3,11 +3,9 @@
 SET GLOBAL time_zone = '+00:00';
 
 # modified from SO answer http://stackoverflow.com/questions/5125096/for-loop-in-mysql
-DROP DATABASE IF EXISTS hello_world;
 CREATE DATABASE hello_world;
 USE hello_world;
 
-DROP TABLE IF EXISTS world;
 CREATE TABLE  world (
   id int(10) unsigned NOT NULL auto_increment,
   randomNumber int NOT NULL default 0,
@@ -17,8 +15,6 @@ ENGINE=INNODB;
 GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'%' IDENTIFIED BY 'benchmarkdbpass';
 GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'localhost' IDENTIFIED BY 'benchmarkdbpass';
 
-DROP PROCEDURE IF EXISTS load_data;
-
 DELIMITER #
 CREATE PROCEDURE load_data()
 BEGIN
@@ -39,7 +35,6 @@ DELIMITER ;
 
 CALL load_data();
 
-DROP TABLE IF EXISTS fortune;
 CREATE TABLE  fortune (
   id int(10) unsigned NOT NULL auto_increment,
   message varchar(2048) CHARACTER SET 'utf8' NOT NULL,

+ 3 - 2
toolset/setup/linux/docker/databases/mysql/mysql.dockerfile

@@ -33,8 +33,9 @@ RUN cp -R -p /var/log/mysql /ssd/log
 # do not see running processes from prior RUN calls; therefor, each command here
 # that relies on the mysql server running will explicitly start the server and
 # perform the work required.
-RUN service mysql start && mysqladmin -uroot -psecret flush-hosts
-RUN service mysql start && mysql -uroot -psecret < create.sql
+RUN service mysql start && \
+    mysqladmin -uroot -psecret flush-hosts && \
+    mysql -uroot -psecret < create.sql
 
 EXPOSE 3306
 

+ 0 - 0
toolset/setup/linux/databases/postgresql/60-postgresql-shm.conf → toolset/setup/linux/docker/databases/postgres/60-postgresql-shm.conf


+ 3 - 0
toolset/setup/linux/docker/databases/postgres/create-postgres-database.sql

@@ -0,0 +1,3 @@
+CREATE USER benchmarkdbuser WITH PASSWORD 'benchmarkdbpass';
+
+CREATE DATABASE hello_world WITH TEMPLATE = template0 ENCODING 'UTF8';

+ 0 - 6
toolset/setup/linux/databases/postgresql/create-postgres.sql → toolset/setup/linux/docker/databases/postgres/create-postgres.sql

@@ -1,5 +1,3 @@
-
-DROP TABLE IF EXISTS World;
 CREATE TABLE  World (
   id integer NOT NULL,
   randomNumber integer NOT NULL default 0,
@@ -10,7 +8,6 @@ GRANT SELECT, UPDATE ON World to benchmarkdbuser;
 INSERT INTO World (id, randomnumber)
 SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
 
-DROP TABLE IF EXISTS Fortune;
 CREATE TABLE Fortune (
   id integer NOT NULL,
   message varchar(2048) NOT NULL,
@@ -31,8 +28,6 @@ INSERT INTO Fortune (id, message) VALUES (10, 'Computers make very fast, very ac
 INSERT INTO Fortune (id, message) VALUES (11, '<script>alert("This should not be displayed in a browser alert box.");</script>');
 INSERT INTO Fortune (id, message) VALUES (12, 'フレームワークのベンチマーク');
 
-
-DROP TABLE IF EXISTS "World";
 CREATE TABLE  "World" (
   id integer NOT NULL,
   randomNumber integer NOT NULL default 0,
@@ -43,7 +38,6 @@ GRANT SELECT, UPDATE ON "World" to benchmarkdbuser;
 INSERT INTO "World" (id, randomnumber)
 SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
 
-DROP TABLE IF EXISTS "Fortune";
 CREATE TABLE "Fortune" (
   id integer NOT NULL,
   message varchar(2048) NOT NULL,

+ 0 - 0
toolset/setup/linux/databases/postgresql/pg_hba.conf → toolset/setup/linux/docker/databases/postgres/pg_hba.conf


+ 52 - 0
toolset/setup/linux/docker/databases/postgres/postgres.dockerfile

@@ -0,0 +1,52 @@
+FROM ubuntu:16.04
+
+RUN apt-get update
+RUN apt-get install -qqy locales
+
+RUN locale-gen en_US.UTF-8
+ENV LANG en_US.UTF-8  
+ENV LANGUAGE en_US:en  
+ENV LC_ALL en_US.UTF-8 
+
+ADD postgresql.conf postgresql.conf
+ADD pg_hba.conf pg_hba.conf
+ADD 60-postgresql-shm.conf 60-postgresql-shm.conf
+ADD create-postgres-database.sql create-postgres-database.sql
+ADD create-postgres.sql create-postgres.sql
+
+# install postgresql on database machine
+RUN apt-get -y update
+RUN apt-get -y install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" postgresql
+
+ENV PG_VERSION 9.5
+
+# Make sure all the configuration files in main belong to postgres
+RUN mv postgresql.conf /etc/postgresql/${PG_VERSION}/main/postgresql.conf
+RUN mv pg_hba.conf /etc/postgresql/${PG_VERSION}/main/pg_hba.conf
+
+RUN chown -Rf postgres:postgres /etc/postgresql/${PG_VERSION}/main
+
+RUN mkdir /ssd
+RUN cp -R -p /var/lib/postgresql/${PG_VERSION}/main /ssd/postgresql
+RUN cp /etc/postgresql/${PG_VERSION}/main/postgresql.conf /ssd/postgresql
+RUN mv 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf
+
+RUN chown -Rf postgres:postgres /var/run/postgresql
+RUN chmod 2777 /var/run/postgresql
+RUN chown postgres:postgres /etc/sysctl.d/60-postgresql-shm.conf
+RUN chown postgres:postgres create-postgres*
+RUN chown -Rf postgres:postgres /ssd
+
+USER postgres
+
+# We have to wait for postgres to start before we can use the cli
+RUN service postgresql start && \
+    until psql -c "\q"; do sleep 1; done && \
+    psql < create-postgres-database.sql && \
+    psql -q hello_world < create-postgres.sql
+
+EXPOSE 5432
+ENV PATH $PATH:/usr/lib/postgresql/$PG_VERSION/bin
+ENV PGDATA=/var/lib/postgresql/data 
+
+CMD ["postgres", "-D", "/ssd/postgresql"]

+ 4 - 4
toolset/setup/linux/databases/postgresql/postgresql.conf → toolset/setup/linux/docker/databases/postgres/postgresql.conf

@@ -40,13 +40,13 @@
 
 data_directory = '/ssd/postgresql'		# use data in another directory
 					# (change requires restart)
-hba_file = '/etc/postgresql/9.3/main/pg_hba.conf'	# host-based authentication file
+hba_file = '/etc/postgresql/9.5/main/pg_hba.conf'	# host-based authentication file
 					# (change requires restart)
-ident_file = '/etc/postgresql/9.3/main/pg_ident.conf'	# ident configuration file
+ident_file = '/etc/postgresql/9.5/main/pg_ident.conf'	# ident configuration file
 					# (change requires restart)
 
 # If external_pid_file is not explicitly set, no extra PID file is written.
-external_pid_file = '/var/run/postgresql/9.3-main.pid'		# write an extra PID file
+external_pid_file = '/var/run/postgresql/9.5-main.pid'		# write an extra PID file
 					# (change requires restart)
 
 
@@ -112,7 +112,7 @@ ssl = false                             # (change requires restart)
 shared_buffers = 256MB                    # min 128kB
 work_mem = 64MB                                # min 64kB
 maintenance_work_mem = 512MB            # min 1MB
-checkpoint_segments = 64
+# checkpoint_segments = 64
 checkpoint_completion_target = 0.9
 effective_cache_size = 8GB
 

+ 1 - 1
toolset/setup/linux/docker/java.dockerfile

@@ -3,7 +3,7 @@ FROM tfb:latest
 RUN add-apt-repository -y ppa:openjdk-r/ppa
 RUN apt-get update
 RUN apt-get install -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
-    openjdk-8-jdk
+    openjdk-8-jdk ant
 
 # https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1396760
 RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure

+ 0 - 12
toolset/setup/linux/languages/java.sh

@@ -1,12 +0,0 @@
-#!/bin/bash
-
-fw_installed java && return 0
-
-fw_get -O https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz
-fw_untar openjdk-9.0.4_linux-x64_bin.tar.gz
-
-JAVA_HOME=$IROOT/jdk-9.0.4
-echo "export JAVA_HOME=${JAVA_HOME}" > $IROOT/java.installed
-echo -e "export PATH=\$JAVA_HOME/bin:\$PATH" >> $IROOT/java.installed
-
-source $IROOT/java.installed

+ 0 - 12
toolset/setup/linux/systools/ant.sh

@@ -1,12 +0,0 @@
-#!/bin/bash
-
-fw_installed ant && return 0
-
-sudo apt-get update
-sudo apt-get -y --force-yes install ant
-
-echo "export PATH=/usr/share/ant/bin:\$PATH" > $IROOT/ant.installed
-
-source $IROOT/ant.installed
-
-ant -version

+ 0 - 28
toolset/setup/linux/webservers/resin/resin-java8.sh

@@ -1,28 +0,0 @@
-#!/bin/bash
-
-fw_depends java8
-
-fw_installed resin-java8 && return 0
-
-RESIN_VERSION=4.0.55
-RESIN_HOME=$IROOT/resin-java8/resin-$RESIN_VERSION
-
-mkdir resin-java8
-cd resin-java8
-fw_get -O http://www.caucho.com/download/resin-$RESIN_VERSION.tar.gz
-fw_untar resin-$RESIN_VERSION.tar.gz
-cd resin-$RESIN_VERSION
-./configure --prefix=`pwd`
-make
-make install
-
-mv conf/resin.properties conf/resin.properties.orig
-cat $FWROOT/toolset/setup/linux/webservers/resin/resin.properties > conf/resin.properties
-
-mv conf/resin.xml conf/resin.xml.orig
-cat $FWROOT/toolset/setup/linux/webservers/resin/resin.xml > conf/resin.xml
-
-echo "export RESIN_HOME=${RESIN_HOME}" > $IROOT/resin-java8.installed
-echo -e "export PATH=\$RESIN_HOME/bin:\$PATH" >> $IROOT/resin-java8.installed
-
-source $IROOT/resin-java8.installed

+ 0 - 165
toolset/setup/linux/webservers/resin/resin.properties

@@ -1,165 +0,0 @@
-# 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     : severe
-
-# Enable verbose browser error reporting
-dev_mode      : false
-
-# How often Resin should check for updated files.
-dependency_check_interval : 5m
-
-# Enable /resin-doc Resin documentation
-resin_doc      : false
-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
-
-# 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
-
-# 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 -Xms2048m -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
-
-# Enable JNI TCP speed optimizations
-tcp_cork : true
-sendfile : 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 : [email protected]
-
-# 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 : false
-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

+ 0 - 28
toolset/setup/linux/webservers/resin/resin.sh

@@ -1,28 +0,0 @@
-#!/bin/bash
-
-fw_depends java
-
-fw_installed resin && return 0
-
-RESIN_VERSION=4.0.55
-RESIN_HOME=$IROOT/resin/resin-$RESIN_VERSION
-
-mkdir resin
-cd resin
-fw_get -O http://www.caucho.com/download/resin-$RESIN_VERSION.tar.gz
-fw_untar resin-$RESIN_VERSION.tar.gz
-cd resin-$RESIN_VERSION
-./configure --prefix=`pwd`
-make
-make install
-
-mv conf/resin.properties conf/resin.properties.orig
-cat $FWROOT/toolset/setup/linux/webservers/resin/resin.properties > conf/resin.properties
-
-mv conf/resin.xml conf/resin.xml.orig
-cat $FWROOT/toolset/setup/linux/webservers/resin/resin.xml > conf/resin.xml
-
-echo "export RESIN_HOME=${RESIN_HOME}" > $IROOT/resin.installed
-echo -e "export PATH=\$RESIN_HOME/bin:\$PATH" >> $IROOT/resin.installed
-
-source $IROOT/resin.installed

+ 0 - 22
toolset/setup/linux/webservers/resin/resin.xml

@@ -1,22 +0,0 @@
-<resin xmlns="http://caucho.com/ns/resin"
-       xmlns:resin="http://caucho.com/ns/resin/core">
-
-  <cluster id="">
-
-    <resin:import path="${RESIN_HOME}/conf/app-default.xml" />
-    <log name="" level="config" path="stdout:" timestamp="[%H:%M:%S.%s] " />
-
-    <server id="">
-      <jvm-arg>-Xms1g</jvm-arg>
-      <jvm-arg>-Xmx1g</jvm-arg>
-
-      <http port="8080" />
-    </server>
-
-    <host>
-        <web-app-deploy path="${RESIN_HOME}/webapps"
-                      expand-preserve-fileset="WEB-INF/work/**"/>
-    </host>
-
-  </cluster>
-</resin>