Last active
February 1, 2019 17:36
-
-
Save azolotko/ffea3a9f9b14fa8d65438bd710c05019 to your computer and use it in GitHub Desktop.
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
private val vpc = Vpc("demo-vpc", "172.101.0.0/16") | |
private val subnet = Subnet("demo-subnet", "172.101.0.0/24", vpc) | |
private val sshPermission = new IpPermission() | |
.withIpv4Ranges(new IpRange().withCidrIp("0.0.0.0/32")) | |
.withIpProtocol("tcp") | |
.withFromPort(22) | |
.withToPort(22) | |
private val key = Key("demo-key") | |
private val securityGroup = | |
SecurityGroup("demo-instance-sg", | |
"demo-instance-sg", | |
vpc, | |
Seq(sshPermission)) | |
private val debianStretchImageId = "ami-0bd9223868b4778d7" | |
private val demoHost = | |
EC2LinuxInstance("demo-instance", | |
InstanceType.T3Micro, | |
Regions.US_EAST_1, | |
debianStretchImageId, | |
securityGroup, | |
subnet, | |
key) | |
private val h2Cluster = H2Cluster(H2ServerHost("demo-h2-1", demoHost)) | |
private val cassandraCluster = CassandraCluster( | |
CassandraHost("demo-cassandra-1", demoHost)) | |
private val receiver = | |
Receiver(ReceiverHost("demo-receiver-1", demoHost), | |
h2Cluster, | |
cassandraCluster) | |
private val webApp = | |
WebApp(WebAppHost("demo-webapp-1", demoHost), h2Cluster, cassandraCluster) | |
private val cluster = ObservatoryCluster("demo", receiver, webApp) | |
deploy(cluster) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment