Last active
December 12, 2016 10:51
-
-
Save grkvlt/f6c9a1071fbd55dc916438cefdf63363 to your computer and use it in GitHub Desktop.
OpenShift and Cloudsoft AMP Resources
This file contains hidden or 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
id: netcat-application | |
name: "netcat-application" | |
location: | |
openshift: | |
endpoint: "https://OPENSHIFT_MASTER_ADDRESS:8443/" | |
identity: "admin" | |
oauthToken: "OAUTH_TOKEN_FOR_ADMIN" | |
namespace: "default" | |
privileged: true | |
loginUser.password: "n3wp4ss" | |
services: | |
- type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess | |
name: "Simple Netcat Server" | |
brooklyn.config: | |
provisioning.properties: | |
env: | |
CLOUDSOFT_ROOT_PASSWORD: "n3wp4ss" | |
inboundPorts: | |
- 22 | |
- 4321 | |
launch.command: | | |
yum install -y nc | |
echo hello | nc -l 4321 & | |
echo $! > $PID_FILE |
This file contains hidden or 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
id: three-tier-application | |
name: "three-tier-application" | |
location: | |
openshift: | |
endpoint: "https://OPENSHIFT_MASTER_ADDRESS:8443/" | |
identity: "admin" | |
caCertFile: "PATH_TO_CA_CERT_FILE" | |
clientCertFile: "PATH_TO_CLIENT_CERT_FILE" | |
clientKeyFile: "PATH_TO_CLIENT_KEY_FILE" | |
namespace: "default" | |
privileged: true | |
loginUser.password: "p4ssw0rd" | |
services: | |
- type: org.apache.brooklyn.entity.group.DynamicCluster | |
id: cluster | |
name: "Webapp Cluster" | |
brooklyn.config: | |
initialSize: 2 | |
memberSpec: | |
$brooklyn:entitySpec: | |
type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer | |
id: tomcat | |
name: "Tomcat Server" | |
brooklyn.config: | |
jmx.enabled: false | |
wars.root: | |
"https://repo.maven.apache.org/maven2/org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.9.0/brooklyn-example-hello-world-sql-webapp-0.9.0.war" | |
java.sysprops: | |
brooklyn.example.db.url: | |
$brooklyn:formatString: | |
- "jdbc:mysql://%s:%d/%s?user=%s&password=%s" | |
- $brooklyn:entity("db").attributeWhenReady("host.subnet.address") | |
- $brooklyn:entity("db").attributeWhenReady("mysql.port") | |
- "visitors" | |
- "brooklyn" | |
- "br00k11n" | |
- type: org.apache.brooklyn.entity.proxy.nginx.NginxController | |
id: nginx | |
name: "Load Balancer (nginx)" | |
brooklyn.config: | |
loadbalancer.serverpool: $brooklyn:sibling("cluster") | |
nginx.sticky: false | |
brooklyn.enrichers: | |
- type: org.apache.brooklyn.core.network.OnPublicNetworkEnricher | |
brooklyn.config: | |
sensors: | |
- main.uri | |
- type: org.apache.brooklyn.entity.database.mysql.MySqlNode | |
id: db | |
name: "Database (MySQL)" | |
brooklyn.config: | |
datastore.creation.script.url: | |
"https://raw.githubusercontent.com/apache/brooklyn-library/master/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql" |
This file contains hidden or 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
id: wordpress-application | |
name: "wordpress-application" | |
location: | |
openshift: | |
endpoint: "https://OPENSHIFT_MASTER_ADDRESS:8443/" | |
identity: "admin" | |
oauthToken: "OAUTH_TOKEN_FOR_ADMIN" | |
namespace: "default" | |
privileged: true | |
loginUser.password: "p4ssw0rd" | |
services: | |
- type: io.cloudsoft.amp.containerservice.kubernetes.entity.KubernetesPod | |
brooklyn.children: | |
- type: io.cloudsoft.amp.containerservice.dockercontainer.DockerContainer | |
id: wordpress-mysql | |
name: "MySQL" | |
brooklyn.config: | |
docker.container.imageName: mysql:5.6 | |
docker.container.inboundPorts: [ "3306" ] | |
provisioning.properties: | |
deployment: wordpress-mysql | |
env: | |
MYSQL_ROOT_PASSWORD: "password" | |
- type: io.cloudsoft.amp.containerservice.dockercontainer.DockerContainer | |
id: wordpress | |
name: "Wordpress" | |
brooklyn.config: | |
docker.container.imageName: wordpress:4.4-apache | |
docker.container.inboundPorts: [ "80" ] | |
provisioning.properties: | |
deployment: wordpress | |
env: | |
WORDPRESS_DB_HOST: "wordpress-mysql" | |
WORDPRESS_DB_PASSWORD: "password" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment