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);
}
// {