Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
c04ca632
Commit
c04ca632
authored
Jun 19, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add exogeni support
parent
57a8fd69
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1095 additions
and
5 deletions
+1095
-5
Dockerfile
Dockerfiles/planner/Dockerfile
+1
-1
exogeni-level-0.yml
docs/plans/exogeni-level-0.yml
+13
-0
exogeni-level-1.yml
docs/plans/exogeni-level-1.yml
+13
-0
PlannerService.java
...main/java/nl/uva/sne/drip/api/service/PlannerService.java
+2
-0
pom.xml
drip-planner2provisioner/pom.xml
+6
-1
P2PConverter.java
...ain/java/nl/uva/sne/drip/drip/converter/P2PConverter.java
+23
-0
ExoGeniSubTopology.java
...ovisionerIn/provisionerIn/ExoGeni/ExoGeniSubTopology.java
+11
-0
ExoGeniVM.java
...verter/provisionerIn/provisionerIn/ExoGeni/ExoGeniVM.java
+10
-0
hs_err_pid5352.log
drip-provisioner/hs_err_pid5352.log
+994
-0
MessageParsing.java
...l/uva/sne/drip/drip/provisioner/utils/MessageParsing.java
+17
-2
Consumer.java
...in/java/nl/uva/sne/drip/drip/provisioner/v1/Consumer.java
+4
-0
project.properties
drip_planner2/nbproject/project.properties
+1
-1
__init__.pyc
drip_planner2/src/drip_logging/__init__.pyc
+0
-0
drip_logging_handler.pyc
drip_planner2/src/drip_logging/drip_logging_handler.pyc
+0
-0
winery_planner.cpython-36.pyc
...er2/src/planner/__pycache__/winery_planner.cpython-36.pyc
+0
-0
No files found.
Dockerfiles/planner/Dockerfile
View file @
c04ca632
...
...
@@ -18,7 +18,7 @@ RUN pip install numpy
RUN
pip
install
networkx
==
1.10
RUN
pip
install
flask
RUN
pip
install
tosca-parser
RUN
pip
install
pika
RUN
pip
install
pika
==
0.11.2
RUN
export
LC_ALL
=
"en_US.UTF-8"
RUN
pip
install
paramiko
...
...
docs/plans/exogeni-level-0.yml
0 → 100644
View file @
c04ca632
---
publicKeyPath
:
"
name@id_rsa.pub"
userName
:
"
vm_user"
topologies
:
-
topology
:
"
exogeni-level-1"
cloudProvider
:
"
ExoGENI"
domain
:
"
RENCI
(Chapel
Hill,
NC
USA)
XO
Rack"
status
:
"
fresh"
tag
:
"
fixed"
statusInfo
:
null
copyOf
:
null
sshKeyPairId
:
null
connections
:
null
docs/plans/exogeni-level-1.yml
0 → 100644
View file @
c04ca632
---
subnets
:
null
components
:
-
name
:
"
nodeA"
type
:
"
switch/compute"
nodeType
:
"
XOMedium"
OStype
:
"
Ubuntu
14.04"
script
:
null
role
:
null
dockers
:
null
publicAddress
:
null
ethernetPort
:
null
VMResourceID
:
null
drip-api/src/main/java/nl/uva/sne/drip/api/service/PlannerService.java
View file @
c04ca632
...
...
@@ -295,6 +295,8 @@ public class PlannerService {
return
"Frankfurt"
;
case
"egi"
:
return
"CESNET"
;
case
"exogeni"
:
return
"RENCI (Chapel Hill, NC USA) XO Rack"
;
}
return
null
;
}
...
...
drip-planner2provisioner/pom.xml
View file @
c04ca632
...
...
@@ -36,7 +36,12 @@
<artifactId>
drip-commons
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
nl.uva.sne.drip
</groupId>
<artifactId>
drip-provisioning-agent
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
jar
</type>
</dependency>
</dependencies>
<build>
...
...
drip-planner2provisioner/src/main/java/nl/uva/sne/drip/drip/converter/P2PConverter.java
View file @
c04ca632
...
...
@@ -18,6 +18,9 @@ import nl.uva.sne.drip.commons.utils.Converter;
import
nl.uva.sne.drip.drip.converter.provisionerIn.*
;
import
nl.uva.sne.drip.drip.converter.provisionerIn.EC2.*
;
import
nl.uva.sne.drip.drip.converter.provisionerIn.provisionerIn.EGI.*
;
import
nl.uva.sne.drip.drip.converter.provisionerIn.provisionerIn.ExoGeni.ExoGeniSubTopology
;
import
nl.uva.sne.drip.drip.converter.provisionerIn.provisionerIn.ExoGeni.ExoGeniVM
;
import
org.json.JSONException
;
public
class
P2PConverter
{
...
...
@@ -163,6 +166,16 @@ public class P2PConverter {
if
(
size
>
5
&&
size
<=
10
)
{
return
"mammoth"
;
}
case
"exogeni"
:
if
(
size
<=
1
)
{
return
"XOSmall"
;
}
if
(
size
>
1
&&
size
<=
5
)
{
return
"XOMedium"
;
}
if
(
size
>
5
&&
size
<=
10
)
{
return
"XOLarge"
;
}
default
:
Logger
.
getLogger
(
P2PConverter
.
class
.
getName
()).
log
(
Level
.
WARNING
,
"The {0} is not supported yet!"
,
cloudProvider
);
return
null
;
...
...
@@ -179,6 +192,9 @@ public class P2PConverter {
case
"egi"
:
curVM
=
new
EGIVM
();
break
;
case
"exogeni"
:
curVM
=
new
ExoGeniVM
();
break
;
default
:
Logger
.
getLogger
(
P2PConverter
.
class
.
getName
()).
log
(
Level
.
WARNING
,
"The {0} is not supported yet!"
,
cloudProvider
);
return
null
;
...
...
@@ -227,6 +243,10 @@ public class P2PConverter {
subTopology
=
new
EGISubTopology
();
((
EGISubTopology
)
subTopology
).
components
=
new
ArrayList
<>();
break
;
case
"exogeni"
:
subTopology
=
new
ExoGeniSubTopology
();
((
ExoGeniSubTopology
)
subTopology
).
components
=
new
ArrayList
<>();
break
;
default
:
Logger
.
getLogger
(
P2PConverter
.
class
.
getName
()).
log
(
Level
.
WARNING
,
"The {0} is not supported yet!"
,
cloudProvider
);
return
null
;
...
...
@@ -242,6 +262,9 @@ public class P2PConverter {
case
"egi"
:
((
EGISubTopology
)
subTopology
).
components
.
add
((
EGIVM
)
vm
);
break
;
case
"exogeni"
:
((
ExoGeniSubTopology
)
subTopology
).
components
.
add
((
ExoGeniVM
)
vm
);
break
;
default
:
Logger
.
getLogger
(
P2PConverter
.
class
.
getName
()).
log
(
Level
.
WARNING
,
"The {0} is not supported yet!"
,
cloudProvider
);
// return null;
...
...
drip-planner2provisioner/src/main/java/nl/uva/sne/drip/drip/converter/provisionerIn/provisionerIn/ExoGeni/ExoGeniSubTopology.java
0 → 100644
View file @
c04ca632
package
nl
.
uva
.
sne
.
drip
.
drip
.
converter
.
provisionerIn
.
provisionerIn
.
ExoGeni
;
import
java.util.ArrayList
;
import
nl.uva.sne.drip.drip.converter.provisionerIn.SubTopology
;
public
class
ExoGeniSubTopology
extends
SubTopology
{
//Indicate different VMs.
public
ArrayList
<
ExoGeniVM
>
components
;
}
drip-planner2provisioner/src/main/java/nl/uva/sne/drip/drip/converter/provisionerIn/provisionerIn/ExoGeni/ExoGeniVM.java
0 → 100644
View file @
c04ca632
package
nl
.
uva
.
sne
.
drip
.
drip
.
converter
.
provisionerIn
.
provisionerIn
.
ExoGeni
;
import
nl.uva.sne.drip.drip.converter.provisionerIn.VM
;
public
class
ExoGeniVM
extends
VM
{
public
String
OSurl
;
public
String
OSguid
;
}
drip-provisioner/hs_err_pid5352.log
0 → 100644
View file @
c04ca632
This diff is collapsed.
Click to expand it.
drip-provisioner/src/main/java/nl/uva/sne/drip/drip/provisioner/utils/MessageParsing.java
View file @
c04ca632
...
...
@@ -26,6 +26,7 @@ import java.net.URL;
import
java.security.cert.CertificateEncodingException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Base64
;
import
java.util.List
;
import
java.util.Map
;
import
nl.uva.sne.drip.commons.utils.AAUtils
;
...
...
@@ -33,6 +34,7 @@ import nl.uva.sne.drip.commons.utils.AAUtils.SOURCE;
import
static
nl
.
uva
.
sne
.
drip
.
commons
.
utils
.
AAUtils
.
downloadCACertificates
;
import
nl.uva.sne.drip.drip.commons.data.internal.MessageParameter
;
import
nl.uva.sne.drip.drip.commons.data.v1.external.CloudCredentials
;
import
org.apache.commons.io.FileUtils
;
//import org.globus.myproxy.MyProxyException;
import
org.ietf.jgss.GSSException
;
import
org.json.JSONArray
;
...
...
@@ -42,6 +44,7 @@ import org.yaml.snakeyaml.Yaml;
import
provisioning.credential.Credential
;
import
provisioning.credential.EC2Credential
;
import
provisioning.credential.EGICredential
;
import
provisioning.credential.ExoGENICredential
;
/**
*
...
...
@@ -135,11 +138,11 @@ public class MessageParsing {
MessageParameter
messageParam
=
mapper
.
readValue
(
param
.
toString
(),
MessageParameter
.
class
);
String
name
=
messageParam
.
getName
();
String
value
=
messageParam
.
getValue
();
if
(
name
.
equals
(
"scale_topology_name"
))
{
if
(
name
.
equals
(
"scale_topology_name"
))
{
return
messageParam
;
}
}
return
null
;
}
...
...
@@ -200,6 +203,18 @@ public class MessageParsing {
egi
.
trustedCertPath
=
PropertyValues
.
TRUSTED_CERTIFICATE_FOLDER
;
credential
=
egi
;
}
if
(
cred
.
getCloudProviderName
().
toLowerCase
().
equals
(
"exogeni"
))
{
ExoGENICredential
exoGeniCredential
=
new
ExoGENICredential
();
exoGeniCredential
.
keyAlias
=
cred
.
getAccessKeyId
();
exoGeniCredential
.
keyPassword
=
cred
.
getSecretKey
();
Map
<
String
,
Object
>
att
=
cred
.
getAttributes
();
if
(
att
!=
null
&&
att
.
containsKey
(
"keystore"
))
{
String
javaKeyStoreEncoded
=
(
String
)
att
.
get
(
"keystore"
);
byte
[]
decoded
=
Base64
.
getDecoder
().
decode
(
javaKeyStoreEncoded
);
FileUtils
.
writeByteArrayToFile
(
new
File
(
tempInputDirPath
+
File
.
separator
+
"user.jks"
),
decoded
);
}
credential
=
exoGeniCredential
;
}
// for (KeyPair pair : cred.getKeyPairs()) {
// if (pair != null) {
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/drip/provisioner/v1/Consumer.java
View file @
c04ca632
...
...
@@ -53,6 +53,7 @@ import org.json.JSONObject;
import
provisioning.credential.Credential
;
import
provisioning.credential.EC2Credential
;
import
provisioning.credential.EGICredential
;
import
provisioning.credential.ExoGENICredential
;
import
provisioning.credential.SSHKeyPair
;
import
provisioning.credential.UserCredential
;
import
provisioning.database.EC2.EC2Database
;
...
...
@@ -499,6 +500,9 @@ public class Consumer extends DefaultConsumer {
if
(
cred
instanceof
EGICredential
)
{
userCredential
.
cloudAccess
.
put
(
"egi"
,
cred
);
}
if
(
cred
instanceof
ExoGENICredential
)
{
userCredential
.
cloudAccess
.
put
(
"egi"
,
cred
);
}
}
return
userCredential
;
}
...
...
drip_planner2/nbproject/project.properties
View file @
c04ca632
java.lib.path
=
main.file
=
rpc_server.py
platform.active
=
Python_2.7.1
2
platform.active
=
Python_2.7.1
5
python.lib.path
=
src.dir
=
src
drip_planner2/src/drip_logging/__init__.pyc
View file @
c04ca632
No preview for this file type
drip_planner2/src/drip_logging/drip_logging_handler.pyc
View file @
c04ca632
No preview for this file type
drip_planner2/src/planner/__pycache__/winery_planner.cpython-36.pyc
0 → 100644
View file @
c04ca632
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment