Package org.platformlayer.service.desktop.model

Examples of org.platformlayer.service.desktop.model.Desktop


  public void doOperation() throws OpsException, IOException {
  }

  @Override
  protected void addChildren() throws OpsException {
    Desktop model = OpsContext.get().getInstance(Desktop.class);

    InstanceBuilder instance = InstanceBuilder.build(model.dnsName, this, model.getTags());
    instance.publicPorts.add(22);

    instance.hostPolicy.allowRunInContainer = true;
    instance.minimumMemoryMb = 4096;

    addChild(instance);

    {
      RecipeOperatingSystem os = injected(RecipeOperatingSystem.class);
      os.operatingSystem = new OperatingSystemRecipe();
      os.operatingSystem.setDistribution("debian");
      os.operatingSystem.setVersion("wheezy");
      instance.addChild(os);
    }

    // We use curl for backups
    instance.addChild(PackageDependency.build("curl"));

    {
      PublicEndpoint endpoint = injected(PublicEndpoint.class);
      // endpoint.network = null;
      endpoint.publicPort = 22;
      endpoint.backendPort = 22;
      endpoint.dnsName = model.dnsName;

      endpoint.tagItem = model.getKey();
      endpoint.parentItem = model.getKey();

      instance.addChild(endpoint);
    }

    // {
View Full Code Here

TOP

Related Classes of org.platformlayer.service.desktop.model.Desktop

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.