Search in sources :

Example 11 with LaunchEnvironment

use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.

the class NbWorkerTopology method main.

/**
 * Launches and sets up the workflow manager environment.
 *
 * @param args the command-line arguments.
 */
public static void main(String[] args) {
    try {
        LaunchEnvironment env = new LaunchEnvironment(args);
        new NbWorkerTopology(env).setup();
    } catch (Exception e) {
        System.exit(handleLaunchException(e));
    }
}
Also used : LaunchEnvironment(org.openkilda.wfm.LaunchEnvironment)

Example 12 with LaunchEnvironment

use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.

the class StatsTopologyTest method setupOnce.

@BeforeClass
public static void setupOnce() throws Exception {
    Properties configOverlay = getZooKeeperProperties(STATS_TOPOLOGY_TEST_ZOOKEEPER_PORT, ROOT_NODE);
    configOverlay.putAll(getKafkaProperties(STATS_TOPOLOGY_TEST_KAFKA_PORT));
    configOverlay.setProperty("opentsdb.metric.prefix", METRIC_PREFIX);
    AbstractStormTest.startZooKafka(configOverlay);
    setStartSignal(STATS_TOPOLOGY_TEST_ZOOKEEPER_PORT, ROOT_NODE, COMPONENT_NAME, RUN_ID);
    AbstractStormTest.startStorm(COMPONENT_NAME, RUN_ID);
    LaunchEnvironment launchEnvironment = makeLaunchEnvironment();
    launchEnvironment.setupOverlay(configOverlay);
    persistenceManager = InMemoryGraphPersistenceManager.newInstance();
    persistenceManager.install();
    StatsTopology statsTopology = new StatsTopology(launchEnvironment, persistenceManager);
    statsTopologyConfig = statsTopology.getConfig();
    StormTopology stormTopology = statsTopology.createTopology();
    Config config = stormConfig();
    cluster.submitTopology(StatsTopologyTest.class.getSimpleName(), config, stormTopology);
    otsdbConsumer = new TestKafkaConsumer(statsTopologyConfig.getKafkaOtsdbTopic(), kafkaConsumerProperties(UUID.randomUUID().toString(), COMPONENT_NAME, RUN_ID));
    otsdbConsumer.start();
    flowRepository = persistenceManager.getRepositoryFactory().createFlowRepository();
    switchRepository = persistenceManager.getRepositoryFactory().createSwitchRepository();
    sleep(TOPOLOGY_START_TIMEOUT);
}
Also used : TestKafkaConsumer(org.openkilda.wfm.topology.TestKafkaConsumer) Config(org.apache.storm.Config) StormTopology(org.apache.storm.generated.StormTopology) LaunchEnvironment(org.openkilda.wfm.LaunchEnvironment) Properties(java.util.Properties) BeforeClass(org.junit.BeforeClass)

Example 13 with LaunchEnvironment

use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.

the class SwitchManagerTopology method main.

/**
 * Launches and sets up the workflow manager environment.
 *
 * @param args the command-line arguments.
 */
public static void main(String[] args) {
    try {
        LaunchEnvironment env = new LaunchEnvironment(args);
        new SwitchManagerTopology(env).setup();
    } catch (Exception e) {
        System.exit(handleLaunchException(e));
    }
}
Also used : LaunchEnvironment(org.openkilda.wfm.LaunchEnvironment)

Example 14 with LaunchEnvironment

use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.

the class CacheTopology method main.

public static void main(String[] args) {
    try {
        LaunchEnvironment env = new LaunchEnvironment(args);
        (new CacheTopology(env)).setup();
    } catch (Exception e) {
        System.exit(handleLaunchException(e));
    }
}
Also used : LaunchEnvironment(org.openkilda.wfm.LaunchEnvironment) ConfigurationException(org.openkilda.wfm.ConfigurationException) NameCollisionException(org.openkilda.wfm.NameCollisionException)

Example 15 with LaunchEnvironment

use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.

the class OpenTSDBTopology method main.

public static void main(String[] args) {
    try {
        LaunchEnvironment env = new LaunchEnvironment(args);
        (new OpenTSDBTopology(env)).setup();
    } catch (Exception e) {
        System.exit(handleLaunchException(e));
    }
}
Also used : LaunchEnvironment(org.openkilda.wfm.LaunchEnvironment) ConfigurationException(org.openkilda.wfm.ConfigurationException)

Aggregations

LaunchEnvironment (org.openkilda.wfm.LaunchEnvironment)25 ConfigurationException (org.openkilda.wfm.ConfigurationException)8 Properties (java.util.Properties)3 Config (org.apache.storm.Config)2 StormTopology (org.apache.storm.generated.StormTopology)2 BeforeClass (org.junit.BeforeClass)2 StreamNameCollisionException (org.openkilda.wfm.StreamNameCollisionException)2 TestKafkaConsumer (org.openkilda.wfm.topology.TestKafkaConsumer)2 NameCollisionException (org.openkilda.wfm.NameCollisionException)1 ConfigurationException (org.openkilda.wfm.error.ConfigurationException)1