brooklyn.entity.database.mariadb.MariaDbNode Maven / Gradle / Ivy
package brooklyn.entity.database.mariadb;
import brooklyn.catalog.Catalog;
import brooklyn.config.ConfigKey;
import brooklyn.entity.basic.Attributes;
import brooklyn.entity.basic.ConfigKeys;
import brooklyn.entity.basic.SoftwareProcess;
import brooklyn.entity.database.DatabaseNode;
import brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
import brooklyn.entity.proxying.ImplementedBy;
import brooklyn.entity.trait.HasShortName;
import brooklyn.event.AttributeSensor;
import brooklyn.event.basic.BasicAttributeSensorAndConfigKey;
import brooklyn.event.basic.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
import brooklyn.event.basic.MapConfigKey;
import brooklyn.event.basic.PortAttributeSensorAndConfigKey;
import brooklyn.event.basic.Sensors;
import brooklyn.location.basic.PortRanges;
import brooklyn.util.flags.SetFromFlag;
@Catalog(name="MariaDB Node", description="MariaDB is an open source relational database management system (RDBMS)", iconUrl="classpath:///mariadb-logo-180x119.png")
@ImplementedBy(MariaDbNodeImpl.class)
public interface MariaDbNode extends SoftwareProcess, DatastoreCommon, HasShortName, DatabaseNode {
@SetFromFlag("version")
public static final ConfigKey SUGGESTED_VERSION =
ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "5.5.33a");
// https://downloads.mariadb.org/interstitial/mariadb-5.5.33a/kvm-bintar-hardy-amd64/mariadb-5.5.33a-linux-x86_64.tar.gz/from/http://mirrors.coreix.net/mariadb
// above link points to a "donate" page, then ultimately downloads the artifact from:
// 64-bit: http://mirrors.coreix.net/mariadb/mariadb-5.5.33a/kvm-bintar-hardy-amd64/mariadb-5.5.33a-linux-x86_64.tar.gz
// 32-bit: http://mirrors.coreix.net/mariadb/mariadb-5.5.33a/kvm-bintar-hardy-x86/mariadb-5.5.33a-linux-i686.tar.gz
@SetFromFlag("downloadUrl")
public static final BasicAttributeSensorAndConfigKey DOWNLOAD_URL = new StringAttributeSensorAndConfigKey(
Attributes.DOWNLOAD_URL, "${driver.mirrorUrl}/mariadb-${version}/${driver.downloadParentDir}/mariadb-${version}-${driver.osTag}.tar.gz");
/** download mirror, if desired */
@SetFromFlag("mirrorUrl")
public static final ConfigKey MIRROR_URL = ConfigKeys.newStringConfigKey("mariadb.install.mirror.url", "URL of mirror",
"http://mirrors.coreix.net/mariadb/"
);
@SetFromFlag("port")
public static final PortAttributeSensorAndConfigKey MARIADB_PORT =
new PortAttributeSensorAndConfigKey("mariadb.port", "MariaDB port", PortRanges.fromString("3306, 13306+"));
@SetFromFlag("dataDir")
public static final ConfigKey DATA_DIR = ConfigKeys.newStringConfigKey(
"mariadb.datadir", "Directory for writing data files", null);
@SetFromFlag("serverConf")
public static final MapConfigKey