Initial draft of installation scripts for CentOS 8
Fixed bug in cancelling scheduled send - If campaign was scheduled to be sent, a checkbox was still shown on the campaign status page. This gave wrong impression that by unchecking the checkbox, the scheduling is cancelled. Checkbox is removed now and the "Pause" button has be renamed to "Cancel scheduling" Added default role for campaign admin that administer multiple namespaces.
This commit is contained in:
parent
f323033da7
commit
665a0d0614
6 changed files with 85 additions and 4 deletions
|
@ -419,7 +419,9 @@ class SendControls extends Component {
|
|||
|
||||
content = (
|
||||
<Form stateOwner={this}>
|
||||
{entity.status !== CampaignStatus.SCHEDULED &&
|
||||
<CheckBox id="sendLater" label={t('sendLater')} text={t('scheduleDeliveryAtAParticularDatetime')}/>
|
||||
}
|
||||
{this.getFormValue('sendLater') &&
|
||||
<div>
|
||||
<DatePicker id="date" label={t('date')} />
|
||||
|
@ -440,7 +442,7 @@ class SendControls extends Component {
|
|||
:
|
||||
<Button className="btn-primary" icon="play" label={t('send')} onClickAsync={::this.confirmStart}/>
|
||||
}
|
||||
{entity.status === CampaignStatus.SCHEDULED && <Button className="btn-primary" icon="pause" label={t('Pause')} onClickAsync={::this.stopAsync}/>}
|
||||
{entity.status === CampaignStatus.SCHEDULED && <Button className="btn-primary" icon="pause" label={t('Cancel scheduling')} onClickAsync={::this.stopAsync}/>}
|
||||
{entity.status === CampaignStatus.PAUSED && <Button className="btn-primary" icon="redo" label={t('reset')} onClickAsync={::this.resetAsync}/>}
|
||||
{entity.status === CampaignStatus.PAUSED && <LinkButton className="btn-secondary" icon="signal" label={t('viewStatistics')} to={`/campaigns/${entity.id}/statistics`}/>}
|
||||
</>
|
||||
|
|
|
@ -280,6 +280,10 @@ defaultRoles:
|
|||
description: Under the namespace in which the user is located, the user has all permissions for managing lists, templates and campaigns and the permission to send to send configurations.
|
||||
permissions: [setupAutomation]
|
||||
ownNamespaceRole: campaignsAdmin
|
||||
campaignsAdminWithoutNamespace:
|
||||
name: Campaigns Admin (multiple namespaces)
|
||||
description: Has basic set of rights to setup campaigns, edit lists and templates. The particular namespaces to which it has access have to be shared individually
|
||||
permissions: [setupAutomation]
|
||||
nobody:
|
||||
name: None
|
||||
description: No permissions
|
||||
|
|
|
@ -894,7 +894,7 @@ async function start(context, campaignId, extraData) {
|
|||
}
|
||||
|
||||
async function stop(context, campaignId) {
|
||||
await _changeStatus(context, campaignId, [CampaignStatus.SCHEDULED, CampaignStatus.SENDING], [CampaignStatus.PAUSED, CampaignStatus.PAUSING], 'Cannot stop campaign until it is in SCHEDULED or SENDING state');
|
||||
await _changeStatus(context, campaignId, [CampaignStatus.SCHEDULED, CampaignStatus.SENDING], [CampaignStatus.IDLE, CampaignStatus.PAUSING], 'Cannot stop campaign until it is in SCHEDULED or SENDING state');
|
||||
}
|
||||
|
||||
async function reset(context, campaignId) {
|
||||
|
|
|
@ -12,6 +12,17 @@ case "$hostType" in
|
|||
fi
|
||||
;;
|
||||
|
||||
centos8)
|
||||
hostTypeLabel="CentOS 8"
|
||||
redisService=redis
|
||||
apacheConf="/etc/httpd/conf.d/mailtrain.conf"
|
||||
apacheLogsPath="logs"
|
||||
|
||||
if hash firewall-cmd 2>/dev/null; then
|
||||
firewallCmdExists=true
|
||||
fi
|
||||
;;
|
||||
|
||||
ubuntu1804)
|
||||
hostTypeLabel="Ubuntu 18.04 LTS"
|
||||
redisService=redis-server
|
||||
|
@ -122,6 +133,26 @@ EOT
|
|||
yum -y install mariadb-server nodejs ImageMagick redis pwgen gcc-c++ make mongodb-org bzip2
|
||||
;;
|
||||
|
||||
|
||||
centos8)
|
||||
dnf -y install epel-release
|
||||
|
||||
cat > /etc/yum.repos.d/mongodb-org.repo <<EOT
|
||||
[mongodb-org-4.2]
|
||||
name=MongoDB Repository
|
||||
baseurl=https://repo.mongodb.org/yum/redhat/\$releasever/mongodb-org/4.2/x86_64/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
|
||||
EOT
|
||||
|
||||
dnf -y module install nodejs/development
|
||||
dnf -y module install mariadb/server
|
||||
dnf -y module install redis
|
||||
dnf -y install ImageMagick pwgen gcc-c++ make mongodb-org bzip2
|
||||
;;
|
||||
|
||||
|
||||
ubuntu1804)
|
||||
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
|
||||
|
||||
|
@ -258,6 +289,24 @@ function installHttpd {
|
|||
fi
|
||||
;;
|
||||
|
||||
centos8)
|
||||
dnf -y install httpd mod_ssl
|
||||
systemctl start httpd
|
||||
systemctl enable httpd
|
||||
|
||||
setsebool -P httpd_can_network_connect 1
|
||||
|
||||
if [ -n "$firewallCmdExists" ]; then
|
||||
# Enable SSL ports on the firewall
|
||||
for port in "80/tcp" "${portTrusted}/tcp" "${portSandbox}/tcp" "${portPublic}/tcp"; do
|
||||
firewall-cmd --add-port=$port --permanent
|
||||
done
|
||||
|
||||
# Activate the firefall settings
|
||||
firewall-cmd --reload
|
||||
fi
|
||||
;;
|
||||
|
||||
ubuntu1804)
|
||||
apt-get install -y apache2
|
||||
|
||||
|
@ -377,7 +426,7 @@ EOT
|
|||
|
||||
|
||||
case "$hostType" in
|
||||
centos7)
|
||||
centos7|centos8)
|
||||
systemctl restart httpd
|
||||
;;
|
||||
|
||||
|
@ -407,6 +456,10 @@ function createCertificates {
|
|||
yum install -y certbot python2-certbot-apache
|
||||
;;
|
||||
|
||||
centos8)
|
||||
dnf install -y certbot
|
||||
;;
|
||||
|
||||
ubuntu1804)
|
||||
apt-get install -y certbot python3-certbot-apache
|
||||
;;
|
||||
|
|
11
setup/install-centos8-https.sh
Normal file
11
setup/install-centos8-https.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
hostType=centos8
|
||||
|
||||
SCRIPT_PATH=$(dirname $(realpath -s $0))
|
||||
. $SCRIPT_PATH/functions
|
||||
cd $SCRIPT_PATH/..
|
||||
|
||||
performInstallHttps "$#" "$1" "$2" "$3" "$4"
|
11
setup/install-centos8-local.sh
Normal file
11
setup/install-centos8-local.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
hostType=centos8
|
||||
|
||||
SCRIPT_PATH=$(dirname $(realpath -s $0))
|
||||
. $SCRIPT_PATH/functions
|
||||
cd $SCRIPT_PATH/..
|
||||
|
||||
performInstallLocal "$#"
|
Loading…
Add table
Add a link
Reference in a new issue