166 lines
5.2 KiB
YAML
Executable File
166 lines
5.2 KiB
YAML
Executable File
type: install
|
|
jpsVersion: 7.1.1
|
|
id: wp-edition-woocommerce-cluster
|
|
categories:
|
|
- wordpress
|
|
targetEditions: wordpress
|
|
name: WooCommerce Cluster
|
|
baseUrl: https://raw.githubusercontent.com/jelastic-jps/wordpress-edition/master
|
|
logo: /images/logo/woocommerce-cluster.svg
|
|
description:
|
|
text: /text/woocommerce-cluster.md
|
|
short: WooCommerce Cluster powered by LiteSpeed
|
|
|
|
onBeforeInit: /scripts/onBeforeInit.js
|
|
|
|
settings:
|
|
fields:
|
|
- caption: Advanced Features
|
|
type: displayfield
|
|
name: displayfield
|
|
markup:
|
|
|
|
- caption: WordPress Brute Force Attack Protection
|
|
type: checkbox
|
|
name: wp_protect
|
|
value: true
|
|
disabled: false
|
|
tooltip: "Secure WordPress Admin Panel with <a href='https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:config:wordpress-protection' target='_blank'>LiteSpeed Brute Force Protection</a> that limits failed login attempts. Default action is <b>Throttle</b> and number of allowed attempts is <b>100</b>"
|
|
|
|
- caption: Web Application Firewall
|
|
type: checkbox
|
|
name: waf
|
|
value: true
|
|
disabled: false
|
|
tooltip: "Protect web sites with <a href='https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:waf' target='_blank'>LiteSpeed built-in WAF</a> based on Free ModSecurity Rules from Comodo"
|
|
|
|
- caption: Install Let's Encrypt SSL with Auto-Renewal
|
|
type: checkbox
|
|
name: le-addon
|
|
value: true
|
|
disabled: false
|
|
tooltip: "Advanced integration with Let's Encrypt certificate authority that simplifies and automates the process of issuing, configuring and updating trusted custom SSL certificates."
|
|
|
|
- caption: Install Lightning-Fast Premium CDN
|
|
type: checkbox
|
|
name: cdn-addon
|
|
value: true
|
|
disabled: false
|
|
tooltip: "Jelastic CDN is an HTTP/3 premium content delivery network of 160+ Super PoPs (points of presence) with bandwidth capacity up to 115 Tbps, advanced caching and acceleration strategies based on best-in-class IP Anycast technology."
|
|
|
|
- caption: 'Install GlusterFS Cluster'
|
|
type: checkbox
|
|
name: glusterfs
|
|
value: false
|
|
disabled: false
|
|
tooltip: "Shared Storage auto-clustering is based on GlusterFS software that provides a fault-tolerant distributed file system with automatic data synchronization across the cluster nodes."
|
|
|
|
- type: displayfield
|
|
hideLabel: true
|
|
hidden: true
|
|
name: bl_count
|
|
markup:
|
|
|
|
- type: separator
|
|
|
|
- caption: Topology
|
|
type: displayfield
|
|
name: topology
|
|
tooltip: "<h2 align=center>WooCommerce Cluster powered<br>by LiteSpeed</h2><br><img width='300' height='400' src='https://raw.githubusercontent.com/jelastic-jps/wordpress-edition/master/images/topo/woocommerce-cluster.svg?sanitize=true'><br>"
|
|
|
|
- type: envname
|
|
name: envName
|
|
caption: Environment
|
|
dependsOn: region
|
|
required: true
|
|
|
|
- type: string
|
|
name: displayName
|
|
caption: Display Name
|
|
default: WooCommerce Cluster
|
|
|
|
- caption: Region
|
|
type: regionlist
|
|
name: region
|
|
disableInactive: true
|
|
selectFirstAvailable: true
|
|
stateId: "wp"
|
|
dependsOn: ownerUid
|
|
|
|
- type: owner
|
|
name: ownerUid
|
|
caption: Owner
|
|
|
|
globals:
|
|
wp_jps: https://raw.githubusercontent.com/jelastic-jps/wordpress-cluster/v2.2.0
|
|
wp_admin_pass: ${fn.password(10)}
|
|
ls_admin_pass: ${fn.password(10)}
|
|
db_user: user-${fn.random}
|
|
db_pass: ${fn.password(10)}
|
|
|
|
onInstall:
|
|
- script: /scripts/setGlobals.js?_r=${fn.random}
|
|
|
|
- install:
|
|
jps: ${globals.wp_jps}/manifest.yml?_r=${fn.random}
|
|
envName: ${settings.envName}
|
|
region: ${settings.region}
|
|
loggerName: ${settings.envName}
|
|
displayName: ${settings.displayName}
|
|
envGroups: ${globals.envGroups}
|
|
ownerUid: ${settings.ownerUid}
|
|
settings:
|
|
ls-addon: true
|
|
waf: ${settings.waf}
|
|
glusterfs: ${settings.glusterfs}
|
|
wp_protect: ${settings.wp_protect}
|
|
galera: true
|
|
le-addon: ${settings.le-addon}
|
|
cdn-addon: ${settings.cdn-addon}
|
|
mu-addon: false
|
|
woocommerce: true
|
|
DB_USER: ${globals.db_user}
|
|
DB_PASS: ${globals.db_pass}
|
|
WP_ADMIN_PASS: ${globals.wp_admin_pass}
|
|
LS_ADMIN_PASS: ${globals.ls_admin_pass}
|
|
success_email: false
|
|
project: ${settings.project:default}
|
|
projectScope: ${settings.projectScope:production}
|
|
|
|
- initNodes:
|
|
envName: ${settings.envName}
|
|
namespace: targetNodes
|
|
|
|
- env.control.ApplyNodeGroupData[cp]:
|
|
envName: ${settings.envName}
|
|
data:
|
|
fixedTopologyLayers: 1
|
|
|
|
actions:
|
|
initNodes:
|
|
envName: ${this.envName}
|
|
namespace: ${this.namespace}
|
|
script: |
|
|
let nodes = {}, resp = api.env.control.GetEnvInfo(envName, session);
|
|
if (resp.result != 0) return resp;
|
|
|
|
resp.nodes.sort((node1, node2) => node1.id - node2.id);
|
|
|
|
for (let node of resp.nodes) {
|
|
nodes[node.nodeGroup] = nodes[node.nodeGroup] || [];
|
|
nodes[node.nodeGroup].push(node);
|
|
|
|
if (node.ismaster) {
|
|
nodes.master = nodes.master || {};
|
|
nodes.master[node.nodeGroup] = node;
|
|
}
|
|
}
|
|
let globals = {};
|
|
globals[namespace] = nodes;
|
|
|
|
return { result: 0, onAfterReturn: { setGlobals: globals } }
|
|
|
|
success:
|
|
email: /success/email/woocommerce-cluster.md?_r=${fn.random}
|
|
text: /success/text/woocommerce-cluster.md?_r=${fn.random}
|