Compare commits

...

21 Commits

Author SHA1 Message Date
0a639b111e hsarback/database/database_update.sql aktualisiert
Align with actual system configuration.
2024-11-18 11:07:42 +01:00
Peter Hormanns
ec484b222b calc ram option value from daemon option 2024-10-21 15:44:39 +02:00
Peter Hormanns
42dec2b87d calc ram option value from daemon option 2024-10-21 15:34:34 +02:00
Peter Hormanns
ca9215d5a1 sequence problem when creating domains fixed 2024-07-29 14:41:13 +02:00
Peter Hormanns
e8c256da9c Merge branch 'master' into TP-202311-vhost-bookworm 2024-04-17 16:38:41 +02:00
Peter Hormanns
5004cab814 commit changes 2023-11-27 13:40:39 +01:00
Peter Hormanns
9661178687 auto_ack 2023-09-13 20:42:36 +02:00
Peter Hormanns
a8857091f9 auto_ack 2023-09-13 20:15:04 +02:00
Peter Hormanns
99f33b5b4b client_ack 2023-09-13 19:54:05 +02:00
Peter Hormanns
c530a65461 client_ack 2023-09-13 19:43:17 +02:00
Peter Hormanns
ad42d23545 fix nullpointer, initialize logger 2023-09-13 18:58:51 +02:00
Peter Hormanns
3733c49165 release v4.0.18 2023-09-07 13:13:15 +02:00
Peter Hormanns
f4457d5159 refactoring qserv config 2023-09-05 17:42:53 +02:00
Peter Hormanns
221aea2520 release 4.0.16 2023-09-05 12:17:38 +02:00
Peter Hormanns
4791781eeb null handling 2023-09-05 12:14:22 +02:00
Peter Hormanns
0b3385a3e0 null handling 2023-09-05 12:12:57 +02:00
Peter Hormanns
35862c1c06 null handling 2023-09-05 12:12:13 +02:00
Peter Hormanns
6e39b2e883 refactoring logging, config, error handling 2023-08-15 20:09:02 +02:00
Peter Hormanns
87efe77c78 revert activemq to v5.17.x 2023-08-14 20:41:24 +02:00
Peter Hormanns
9d09d43f3d some cleaning 2023-08-14 20:25:36 +02:00
Peter Hormanns
a85f0d1bec remove jndi config, new ValueObject TaskTransfer, v4.0.16 2023-08-14 20:16:47 +02:00
7 changed files with 47 additions and 34 deletions

View File

@ -1,19 +1,2 @@
ALTER TABLE domain
ADD COLUMN passenger_python character varying(256) DEFAULT '/usr/bin/python3',
ADD COLUMN passenger_nodejs character varying(256) DEFAULT '/usr/bin/node',
ADD COLUMN passenger_ruby character varying(256) DEFAULT '/usr/bin/ruby',
ADD COLUMN fcgi_php_bin character varying(256) DEFAULT '/usr/lib/cgi-bin/php';
INSERT INTO domain_option (domain_option_name) VALUES
('passenger'),
('passengerfriendlyerrorpages'),
('cgi'),
('fastcgi');
INSERT INTO domain__domain_option ( domain_option_id, domain_id )
SELECT ( SELECT domain_option_id FROM domain_option WHERE domain_option_name='cgi' ), domain_id FROM domain;
INSERT INTO domain__domain_option ( domain_option_id, domain_id )
SELECT ( SELECT domain_option_id FROM domain_option WHERE domain_option_name='fastcgi' ), domain_id FROM domain;
INSERT INTO domain__domain_option ( domain_option_id, domain_id )
SELECT ( SELECT domain_option_id FROM domain_option WHERE domain_option_name='passenger' ), domain_id FROM domain;
INSERT INTO component ( basepacket_id, basecomponent_id, admin_only, article_number, min_quantity, max_quantity, default_quantity, increment_quantity, include_quantity )
SELECT basepacket_id, basecomponent_id, false, 1012, 0, 102400000, 0, 0, 0 from basepacket, basecomponent where basepacket_code='PAC/WEB' and basecomponent_code='RAM';

View File

@ -5,7 +5,7 @@
<groupId>de.hsadmin</groupId>
<artifactId>hsar</artifactId>
<packaging>war</packaging>
<version>4.0.15</version>
<version>4.0.16</version>
<name>HSAdmin Stable Backend Webapp</name>
<url>http://maven.apache.org</url>
<properties>
@ -36,12 +36,12 @@
<dependency>
<groupId>de.hsadmin.core</groupId>
<artifactId>hsadmin-util</artifactId>
<version>4.0.15</version>
<version>4.0.16</version>
</dependency>
<dependency>
<groupId>de.hsadmin.core</groupId>
<artifactId>hsadmin-qserv</artifactId>
<version>4.0.15</version>
<version>4.0.16</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>

View File

@ -200,6 +200,19 @@ public class JsonPillarServlet extends HttpServlet {
int storage = pacStorage.getQuantity();
writer.println(" , \"storage\": " + storage);
}
final PacComponent pacDaemons = pac.getPacComponent("DAEMON");
int daemon = 0;
int ram = 16;
if (pacDaemons != null && pacDaemons.getQuantity() > 0) {
daemon = pacDaemons.getQuantity();
ram = daemon * 640;
}
writer.println(" , \"daemon\": " + daemon);
final PacComponent pacRAM = pac.getPacComponent("RAM");
if (pacRAM != null) {
ram = pacRAM.getQuantity();
}
writer.println(" , \"ram\": " + ram);
final PacComponent pacOffice = pac.getPacComponent("OFFICE");
if (pacOffice != null) {
int office = pacOffice.getQuantity();

View File

@ -1,5 +1,9 @@
<Context path="/hsar" reloadable="true" crossContext="true">
<Valve className="org.apache.catalina.valves.ErrorReportValve"
showReport="false"
showServerInfo="false" />
<ResourceLink
name="jdbc/HSAdminDB"
global="jdbc/HSAdminDB"
@ -11,8 +15,18 @@
type="javax.jms.QueueConnectionFactory"/>
<ResourceLink
name="jms/hsadminSystem-h99"
global="jms/hsadminSystem-h99"
name="jms/hsadminSystem-h96"
global="jms/hsadminSystem-h96"
type="javax.jms.Queue"/>
<ResourceLink
name="jms/hsadminSystem-h97"
global="jms/hsadminSystem-h97"
type="javax.jms.Queue"/>
<ResourceLink
name="jms/hsadminSystem-h98"
global="jms/hsadminSystem-h98"
type="javax.jms.Queue"/>
<ResourceLink

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.hsadmin.core</groupId>
<artifactId>hsadmin-qserv</artifactId>
<version>4.0.15</version>
<version>4.0.16</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>8</java.version>
@ -13,7 +13,7 @@
<dependency>
<groupId>de.hsadmin.core</groupId>
<artifactId>hsadmin-util</artifactId>
<version>4.0.15</version>
<version>4.0.16</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
@ -59,7 +59,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.13.0</version>
<configuration>
<source>8</source>
<target>8</target>

View File

@ -35,7 +35,11 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
UnixUser domUser = dom.getUser();
Pac pac = domUser.getPac();
WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(
new CompoundProcessor(new ShellProcessor("salt-call state.sls pacs"))
new CompoundProcessor(
new ShellProcessor("salt-call state.sls pacs"),
createDomainDirectoriesProcessor(dom),
createApacheVHostSetupProcessor(em, dom)
)
);
Config config = Config.getInstance();
for (String queueName : config.getProperty("queues.dns").split(",")) {
@ -44,24 +48,23 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
for (String queueName : config.getProperty("queues.mail").split(",")) {
mainProcessor.appendProcessor(queueName, createMailinSetupProcessor(em, dom, pac), queueName + ".hostsharing.net");
}
mainProcessor.appendProcessor(hiveName, createDomainDirectoriesProcessor(dom), "Setup Domain Directories");
mainProcessor.appendProcessor(hiveName, createApacheVHostSetupProcessor(em, dom), "Setup Apache VHost");
mainProcessor.appendProcessor(hiveName, createTriggerAcmebotProcessor(em, dom), "Trigger ACMEBot");
return mainProcessor;
}
public <T extends AbstractEntity> Processor createUpdateProcessor(final EntityManager em, final T entity) throws ProcessorException {
String hiveName = entity.getHiveName();
final Domain dom = (Domain) entity;
final UnixUser domUser = dom.getUser();
final Pac pac = domUser.getPac();
final Processor apacheVHostSetupProcessor = createApacheVHostSetupProcessor(em, dom);
final Processor triggerAcmebotProcessor = createTriggerAcmebotProcessor(em, dom);
final WaitingTasksProcessor processor = new WaitingTasksProcessor(
new CompoundProcessor(new ShellProcessor("salt-call state.sls pacs"), apacheVHostSetupProcessor, triggerAcmebotProcessor));
new CompoundProcessor(new ShellProcessor("salt-call state.sls pacs"), apacheVHostSetupProcessor));
final Config config = Config.getInstance();
for (String queueName : config.getProperty("queues.mail").split(",")) {
processor.appendProcessor(queueName, createMailinSetupProcessor(em, dom, pac), queueName + ".hostsharing.net");
}
processor.appendProcessor(hiveName, createTriggerAcmebotProcessor(em, dom), "Trigger ACMEBot");
return processor;
}

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.hsadmin.core</groupId>
<artifactId>hsadmin-util</artifactId>
<version>4.0.15</version>
<version>4.0.16</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>8</java.version>
@ -22,7 +22,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.13.0</version>
<configuration>
<source>8</source>
<target>8</target>