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
959f4a83
Commit
959f4a83
authored
5 years ago
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added cloud storm credentials
parent
c10f0682
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
76 additions
and
5 deletions
+76
-5
pom.xml
drip-provisioner/pom.xml
+17
-3
CloudStormService.java
...n/java/nl/uva/sne/drip/provisioner/CloudStormService.java
+25
-2
Consumer.java
...r/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java
+2
-0
CloudCred.yml
openAPI/schema/CloudStorm/CloudCred.yml
+7
-0
cloudCreds.yml
openAPI/schema/CloudStorm/cloudCreds.yml
+7
-0
credInfo.yml
openAPI/schema/CloudStorm/credInfo.yml
+18
-0
No files found.
drip-provisioner/pom.xml
View file @
959f4a83
...
...
@@ -58,9 +58,15 @@
<artifactId>
hamcrest-core
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
nl.uva.sne.zh
</groupId>
<artifactId>
CloudsStorm
</artifactId>
<version>
1.0
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
...
...
@@ -92,5 +98,13 @@
</build>
<repositories>
<repository>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
<id>
zh-releases
</id>
<url>
https://raw.githubusercontent.com/CloudsStorm/mvn-repo/master/releases
</url>
</repository>
</repositories>
</project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java
View file @
959f4a83
...
...
@@ -57,18 +57,37 @@ class CloudStormService {
}
public
ToscaTemplate
execute
()
throws
FileNotFoundException
,
JSchException
,
IOException
,
ApiException
,
Exception
{
String
tempInputDirPath
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
File
.
separator
+
"Input-"
+
Long
.
toString
(
System
.
nanoTime
())
+
File
.
separator
;
File
tempInputDir
=
new
File
(
tempInputDirPath
);
if
(!(
tempInputDir
.
mkdirs
()))
{
throw
new
FileNotFoundException
(
"Could not create input directory: "
+
tempInputDir
.
getAbsolutePath
());
}
String
topologyTempInputDirPath
=
File
.
separator
+
"topology"
;
File
topologyTempInputDir
=
new
File
(
topologyTempInputDirPath
);
if
(!(
topologyTempInputDir
.
mkdirs
()))
{
throw
new
FileNotFoundException
(
"Could not create input directory: "
+
topologyTempInputDir
.
getAbsolutePath
());
}
writeCloudStormTopologyFiles
(
toscaTemplate
,
topologyTempInputDirPath
);
writeCloudStormTopology
(
toscaTemplate
,
tempInputDirPath
);
String
credentialsTempInputDirPath
=
File
.
separator
+
"credentials"
;
File
credentialsTempInputDir
=
new
File
(
credentialsTempInputDirPath
);
if
(!(
credentialsTempInputDir
.
mkdirs
()))
{
throw
new
FileNotFoundException
(
"Could not create input directory: "
+
topologyTempInputDir
.
getAbsolutePath
());
}
writeCloudcredentialsTopologyFiles
(
toscaTemplate
,
credentialsTempInputDirPath
);
String
infrasCodeTempInputDirPath
=
File
.
separator
+
"infrasCodes"
;
File
infrasCodeTempInputDir
=
new
File
(
infrasCodeTempInputDirPath
);
if
(!(
infrasCodeTempInputDir
.
mkdirs
()))
{
throw
new
FileNotFoundException
(
"Could not create input directory: "
+
topologyTempInputDir
.
getAbsolutePath
());
}
return
toscaTemplate
;
}
private
void
writeCloudStormTopology
(
ToscaTemplate
toscaTemplate
,
String
tempInputDirPath
)
throws
JSchException
,
IOException
,
ApiException
,
Exception
{
private
void
writeCloudStormTopology
Files
(
ToscaTemplate
toscaTemplate
,
String
tempInputDirPath
)
throws
JSchException
,
IOException
,
ApiException
,
Exception
{
CloudsStormTopTopology
topTopology
=
new
CloudsStormTopTopology
();
String
publicKeyPath
=
buildSSHKeyPair
(
tempInputDirPath
);
topTopology
.
setPublicKeyPath
(
publicKeyPath
);
...
...
@@ -154,4 +173,8 @@ class CloudStormService {
return
null
;
}
private
void
writeCloudcredentialsTopologyFiles
(
ToscaTemplate
toscaTemplate
,
String
credentialsTempInputDirPath
)
{
throw
new
UnsupportedOperationException
(
"Not supported yet."
);
//To change body of generated methods, choose Tools | Templates.
}
}
This diff is collapsed.
Click to expand it.
drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java
View file @
959f4a83
...
...
@@ -90,6 +90,8 @@ public class Consumer extends DefaultConsumer {
channel
.
basicAck
(
envelope
.
getDeliveryTag
(),
false
);
}
catch
(
JSchException
|
ApiException
ex
)
{
Logger
.
getLogger
(
Consumer
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
catch
(
Exception
ex
)
{
Logger
.
getLogger
(
Consumer
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
}
...
...
This diff is collapsed.
Click to expand it.
openAPI/schema/CloudStorm/CloudCred.yml
0 → 100644
View file @
959f4a83
CloudCred
:
type
:
"
object"
properties
:
cloudProvider
:
type
:
"
string"
credInfoFile
:
type
:
"
string"
This diff is collapsed.
Click to expand it.
openAPI/schema/CloudStorm/cloudCreds.yml
0 → 100644
View file @
959f4a83
cloudCreds
:
type
:
"
object"
properties
:
CloudCred
:
type
:
"
array"
items
:
$ref
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudStorm/CloudCred.yml#/CloudCred"
This diff is collapsed.
Click to expand it.
openAPI/schema/CloudStorm/credInfo.yml
0 → 100644
View file @
959f4a83
credInfo
:
type
:
"
object"
properties
:
userKeyName
:
type
:
"
string"
keyAlias
:
type
:
"
string"
keyPassword
:
type
:
"
string"
proxyFileName
:
type
:
"
string"
trustedCertDirName
:
type
:
"
string"
accessKey
:
type
:
"
string"
secretKey
:
type
:
"
string"
This diff is collapsed.
Click to expand it.
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