Search in sources :

Example 6 with Environment

use of io.pravega.test.system.framework.Environment in project pravega by pravega.

the class MultiSegmentStoreTest method initialize.

@Environment
public static void initialize() throws MarathonException {
    // 1. Check if zk is running, if not start it.
    Service zkService = Utils.createZookeeperService();
    if (!zkService.isRunning()) {
        zkService.start(true);
    }
    List<URI> zkUris = zkService.getServiceDetails();
    log.info("zookeeper service details: {}", zkUris);
    URI zkUri = zkUris.get(0);
    // 2. Check if bk is running, otherwise start it.
    Service bkService = Utils.createBookkeeperService(zkUri);
    if (!bkService.isRunning()) {
        bkService.start(true);
    }
    List<URI> bkUris = bkService.getServiceDetails();
    log.info("bookkeeper service details: {}", bkUris);
    // 3. Start controller.
    Service controllerService = Utils.createPravegaControllerService(zkUri);
    if (!controllerService.isRunning()) {
        controllerService.start(true);
    }
    List<URI> conUris = controllerService.getServiceDetails();
    log.info("Pravega Controller service instance details: {}", conUris);
    // 4. Start segment store.
    Service segService = Utils.createPravegaSegmentStoreService(zkUri, conUris.get(0));
    if (!segService.isRunning()) {
        segService.start(true);
    }
    List<URI> segUris = segService.getServiceDetails();
    log.info("pravega host service details: {}", segUris);
}
Also used : Service(io.pravega.test.system.framework.services.Service) URI(java.net.URI) Environment(io.pravega.test.system.framework.Environment)

Example 7 with Environment

use of io.pravega.test.system.framework.Environment in project pravega by pravega.

the class PravegaControllerTest method setup.

/**
 * This is used to setup the various services required by the system test framework.
 *
 * @throws MarathonException if error in setup
 */
@Environment
public static void setup() throws MarathonException {
    Service zk = Utils.createZookeeperService();
    if (!zk.isRunning()) {
        zk.start(true);
    }
    Service con = Utils.createPravegaControllerService(zk.getServiceDetails().get(0));
    if (!con.isRunning()) {
        con.start(true);
    }
}
Also used : Service(io.pravega.test.system.framework.services.Service) Environment(io.pravega.test.system.framework.Environment)

Example 8 with Environment

use of io.pravega.test.system.framework.Environment in project pravega by pravega.

the class ReadWithAutoScaleTest method setup.

@Environment
public static void setup() {
    // 1. check if zk is running, if not start it
    Service zkService = Utils.createZookeeperService();
    if (!zkService.isRunning()) {
        zkService.start(true);
    }
    List<URI> zkUris = zkService.getServiceDetails();
    log.debug("Zookeeper service details: {}", zkUris);
    // get the zk ip details and pass it to bk, host, controller
    // 2, check if bk is running, otherwise start, get the zk ip
    Service bkService = Utils.createBookkeeperService(zkUris.get(0));
    if (!bkService.isRunning()) {
        bkService.start(true);
    }
    log.debug("Bookkeeper service details: {}", bkService.getServiceDetails());
    // 3. start controller
    Service conService = Utils.createPravegaControllerService(zkUris.get(0));
    if (!conService.isRunning()) {
        conService.start(true);
    }
    List<URI> conUris = conService.getServiceDetails();
    log.debug("Pravega Controller service details: {}", conUris);
    // 4.start host
    Service segService = Utils.createPravegaSegmentStoreService(zkUris.get(0), conUris.get(0));
    if (!segService.isRunning()) {
        segService.start(true);
    }
    log.debug("Pravega host service details: {}", segService.getServiceDetails());
}
Also used : Service(io.pravega.test.system.framework.services.Service) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) URI(java.net.URI) Environment(io.pravega.test.system.framework.Environment)

Example 9 with Environment

use of io.pravega.test.system.framework.Environment in project pravega by pravega.

the class ReadWriteAndAutoScaleWithFailoverTest method initialize.

@Environment
public static void initialize() throws MarathonException, ExecutionException {
    URI zkUri = startZookeeperInstance();
    startBookkeeperInstances(zkUri);
    URI controllerUri = startPravegaControllerInstances(zkUri);
    startPravegaSegmentStoreInstances(zkUri, controllerUri);
}
Also used : URI(java.net.URI) Environment(io.pravega.test.system.framework.Environment)

Example 10 with Environment

use of io.pravega.test.system.framework.Environment in project pravega by pravega.

the class BookkeeperTest method setup.

/**
 * This is used to setup the various services required by the system test framework.
 *
 * @throws MarathonException if error in setup
 */
@Environment
public static void setup() throws MarathonException {
    Service zk = Utils.createZookeeperService();
    if (!zk.isRunning()) {
        zk.start(true);
    }
    Service bk = Utils.createBookkeeperService(zk.getServiceDetails().get(0));
    if (!bk.isRunning()) {
        bk.start(true);
    }
}
Also used : Service(io.pravega.test.system.framework.services.Service) Environment(io.pravega.test.system.framework.Environment)

Aggregations

Environment (io.pravega.test.system.framework.Environment)18 URI (java.net.URI)15 Service (io.pravega.test.system.framework.services.Service)12 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)6 ExecutionException (java.util.concurrent.ExecutionException)2