-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
350 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
....packaging-setup/src/cmdline/resources/configs/agent-cli/conf/keys/agent.truststore.ctmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2013 Yan Pujante | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
// only one set of keys per console at the moment... | ||
def uri = (gluMetaModel.fabrics.values() as List)[0].keys?.agentTrustStore?.uri | ||
|
||
if(uri) | ||
{ | ||
if(uri.isAbsolute()) | ||
{ | ||
packagerContext.shell.fetch(uri, toResource) | ||
} | ||
else | ||
{ | ||
def relativeKeyStoreFile = uri.toString() | ||
def keyStore = packagerContext.keysRoot.createRelative(relativeKeyStoreFile) | ||
packagerContext.shell.fetch(keyStore, toResource) | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
....packaging-setup/src/cmdline/resources/configs/agent-cli/conf/keys/console.keystore.ctmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2013 Yan Pujante | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
// only one set of keys per console at the moment... | ||
def uri = (gluMetaModel.fabrics.values() as List)[0].keys?.consoleKeyStore?.uri | ||
|
||
if(uri) | ||
{ | ||
if(uri.isAbsolute()) | ||
{ | ||
packagerContext.shell.fetch(uri, toResource) | ||
} | ||
else | ||
{ | ||
def relativeKeyStoreFile = uri.toString() | ||
def keyStore = packagerContext.keysRoot.createRelative(relativeKeyStoreFile) | ||
packagerContext.shell.fetch(keyStore, toResource) | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
...ging-setup-impl/src/main/groovy/org/pongasoft/glu/packaging/setup/AgentCliPackager.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (c) 2013 Yan Pujante | ||
* | ||
* Licensed 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.pongasoft.glu.packaging.setup | ||
|
||
import org.linkedin.util.io.resource.Resource | ||
import org.pongasoft.glu.provisioner.core.metamodel.GluMetaModel | ||
|
||
/** | ||
* @author yan@pongasoft.com */ | ||
public class AgentCliPackager extends BasePackager | ||
{ | ||
GluMetaModel metaModel | ||
|
||
Map<String, String> getConfigTokens() | ||
{ | ||
metaModel.configTokens | ||
} | ||
|
||
PackagedArtifact createPackage() | ||
{ | ||
String packageName = inputPackage.filename | ||
|
||
def tokens = [ | ||
gluMetaModel: metaModel, | ||
] | ||
tokens[PACKAGER_CONTEXT_KEY] = packagerContext | ||
|
||
Resource packagePath = outputFolder.createRelative(packageName) | ||
|
||
if(!dryMode) | ||
{ | ||
copyInputPackage(packagePath) | ||
configure(packagePath, tokens) | ||
} | ||
|
||
return new PackagedArtifact(location: packagePath) | ||
} | ||
|
||
Resource configure(Resource packagePath, Map tokens) | ||
{ | ||
processConfigs('agent-cli', tokens, packagePath) | ||
return packagePath | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.