use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.
the class AbstractTopologyTest method getLaunchEnvironment.
/**
* Uses /resources/test_topology.yaml config file to create launch environment.
*/
private LaunchEnvironment getLaunchEnvironment(int firstBoltParallelism, int firstBoltNumTasks) throws IOException, CmdLineException, ConfigurationException {
makeConfigFile();
Properties properties = new Properties();
properties.put(FIRST_BOLT_NAME_PROPERTY, FIRST_BOLT_NAME);
properties.put(TOPOLOGY_PARALLELISM_PROPERTY, String.valueOf(TOPOLOGY_PARALLELISM));
properties.put(FIRST_BOLT_PARALLELISM_PROPERTY, String.valueOf(firstBoltParallelism));
properties.put(FIRST_BOLT_NUM_TASKS_PROPERTY, String.valueOf(firstBoltNumTasks));
properties.put(SECOND_BOLT_NAME_PROPERTY, SECOND_BOLT_NAME);
properties.put(SECOND_BOLT_PARALLELISM_PROPERTY, String.valueOf(SECOND_BOLT_PARALLELISM));
LaunchEnvironment env = makeLaunchEnvironment();
env.setupOverlay(properties);
return env;
}
use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.
the class RerouteTopology 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 RerouteTopology(env).setup();
} catch (Exception e) {
System.exit(handleLaunchException(e));
}
}
use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.
the class PortStateTopology method main.
/**
* Entry point for local run of the topology.
*/
public static void main(String[] args) {
try {
LaunchEnvironment env = new LaunchEnvironment(args);
(new PortStateTopology(env)).setup();
} catch (Exception e) {
System.exit(handleLaunchException(e));
}
}
use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.
the class IslLatencyTopologyTest method setupOnce.
@BeforeClass
public static void setupOnce() throws Exception {
Properties configOverlay = getZooKeeperProperties(ISL_LATENCY_TOPOLOGY_TEST_ZOOKEEPER_PORT, ROOT_NODE);
configOverlay.putAll(getKafkaProperties(ISL_LATENCY_TOPOLOGY_TEST_KAFKA_PORT));
configOverlay.setProperty("opentsdb.metric.prefix", METRIC_PREFIX);
AbstractStormTest.startZooKafka(configOverlay);
setStartSignal(ISL_LATENCY_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();
IslLatencyTopology islLatencyTopology = new IslLatencyTopology(launchEnvironment, persistenceManager);
islLatencyTopologyConfig = islLatencyTopology.getConfig();
StormTopology stormTopology = islLatencyTopology.createTopology();
Config config = stormConfig();
cluster.submitTopology(IslLatencyTopologyTest.class.getSimpleName(), config, stormTopology);
otsdbConsumer = new TestKafkaConsumer(islLatencyTopologyConfig.getKafkaOtsdbTopic(), kafkaConsumerProperties(UUID.randomUUID().toString(), COMPONENT_NAME, RUN_ID));
otsdbConsumer.start();
switchRepository = persistenceManager.getRepositoryFactory().createSwitchRepository();
islRepository = persistenceManager.getRepositoryFactory().createIslRepository();
sleep(TOPOLOGY_START_TIMEOUT);
}
use of org.openkilda.wfm.LaunchEnvironment in project open-kilda by telstra.
the class NetworkTopology method main.
/**
* Discovery topology uploader.
*/
public static void main(String[] args) {
try {
LaunchEnvironment env = new LaunchEnvironment(args);
(new NetworkTopology(env)).setup();
} catch (Exception e) {
System.exit(handleLaunchException(e));
}
}
Aggregations