Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions modules/cloud/cloud-provisioning/README
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
This is the initial project created as an interface to various clouds.
Currently supporting, Openstack on Jetstream using Openstack4j.

To Test Run:-
1) Replace the credentials in src/main/resources/jetstream_openrc.properties with the Jetstream credentials.
2) Update the publicKeyFile, jetstream_imageId, jetstream_flavorId to the local path in src/test/resources/test_data.properties. This are the parameters used by the unit tests.
3) Run JUnit Test org.apache.airavata.cloud.test.CloudIntfTest.
This is the initial project created as an interface to various clouds.
Currently supporting, Openstack on Jetstream using Openstack4j.

To Test Run:-
1) Replace the credentials in src/main/resources/jetstream_openrc.properties with the Jetstream credentials.
2) Update the publicKeyFile, jetstream_imageId, jetstream_flavorId to the local path in src/test/resources/test_data.properties. This are the parameters used by the unit tests.
3) Run JUnit Test org.apache.airavata.cloud.test.CloudIntfTest.

## NETWORK CREATION STEPS
1. Create a network.
2. Create a subnet for the network.
3. Create a router attached to public network.
4. Create an interface between router and the subnet.
Original file line number Diff line number Diff line change
@@ -1,78 +1,151 @@
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/

package org.apache.airavata.cloud.intf;

import org.openstack4j.model.compute.Keypair;
import org.openstack4j.model.compute.Server;

public interface CloudInterface {

/**
* Method to create Server.
* @param serverName
* @param imageId
* @param flavorId
* @param networkId
* @param keyPairName
* @return Server object.
*/
public Server createServer(String serverName, String imageId, String flavorId, String keyPairName);

/**
* Returns the Server object pertaining to the serverId.
* @param serverId
* @return
*/
public Server getServer(String serverId);

/**
* Method to delete Server.
* @param serverId
* @return
*/
public void deleteServer(String serverId);

/**
* Creates a public key pair on the cloud
* @param publicKey
*/
public Keypair createKeyPair(String keyPairName, String publicKey);

/**
* Returns the keypair object associated to the keyPairName.
* @param keyPairName
* @return
*/
public Keypair getKeyPair(String keyPairName);

/**
* Deletes a public key pair on the cloud
* @param publicKey
*/
public void deleteKeyPair(String keyPairName);

/**
* Associates a floating ip to the instance indicated by serverId.
* @param serverId
*/
public void addFloatingIP(String serverId);
}
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/

package org.apache.airavata.cloud.intf;

/**
* The Interface CloudInterface.
*/
public interface CloudInterface {

/**
* Method to create Server.
*
* @param serverName the server name
* @param imageId the image id
* @param flavorId the flavor id
* @param keyPairName the key pair name
* @return Server object.
*/
public Object createServer(String serverName, String imageId, String flavorId, String keyPairName);

/**
* Returns the Server object pertaining to the serverId.
*
* @param serverId the server id
* @return the server
*/
public Object getServer(String serverId);

/**
* Method to delete Server.
*
* @param serverId the server id
*/
public void deleteServer(String serverId);

/**
* Creates a public key pair on the cloud.
*
* @param keyPairName the key pair name
* @param publicKey the public key
* @return the keypair
*/
public Object createKeyPair(String keyPairName, String publicKey);

/**
* Returns the keypair object associated to the keyPairName.
*
* @param keyPairName the key pair name
* @return the key pair
*/
public Object getKeyPair(String keyPairName);

/**
* Deletes a public key pair on the cloud.
*
* @param keyPairName the key pair name
*/
public void deleteKeyPair(String keyPairName);

/**
* Associates a floating ip to the instance indicated by serverId.
*
* @param serverId the server id
*/
public void addFloatingIP(String serverId);

/**
* Creates the router.
*
* @param routerName the router name
* @param externalGatewayName the external gateway name
* @return the object
*/
public Object createRouter(String routerName, String externalGatewayName);

/**
* Creates the subnet.
*
* @param subnetName the subnet name
* @param networkName the network name
* @param subnetCIDR the subnet cidr
* @param ipVersion the ip version
* @return the object
*/
public Object createSubnet(String subnetName, String networkName, String subnetCIDR, int ipVersion);

/**
* Creates the network.
*
* @param networkName the network name
* @return the object
*/
public Object createNetwork(String networkName);

/**
* Creates the router subnet interface.
*
* @param routerName the router name
* @param subnetName the subnet name
* @return the object
*/
public Object createRouterSubnetInterface(String routerName, String subnetName);

/**
* Delete router subnet interface.
*
* @param routerName the router name
* @param subnetName the subnet name
*/
public void deleteRouterSubnetInterface(String routerName, String subnetName);

/**
* Delete subnet.
*
* @param subnetName the subnet name
*/
public void deleteSubnet(String subnetName);

/**
* Delete router.
*
* @param routerName the router name
*/
public void deleteRouter(String routerName);

/**
* Delete network.
*
* @param networkName the network name
*/
public void deleteNetwork(String networkName);
}
Loading