package main

import (
	"go.skia.org/infra/go/gce"
	"go.skia.org/infra/go/gce/server"
)

func MonitoringBase(name, ipAddress string) *gce.Instance {
	vm := server.Server20170613(name)
	vm.DataDisk.SizeGb = 1000
	vm.DataDisk.Type = gce.DISK_TYPE_PERSISTENT_STANDARD
	vm.ExternalIpAddress = ipAddress
	vm.MachineType = gce.MACHINE_TYPE_HIGHMEM_16
	vm.Metadata["owner_primary"] = "jcgregorio"
	vm.Metadata["owner_secondary"] = "borenet"
	return vm
}

func Prod() *gce.Instance {
	return MonitoringBase("skia-monitoring", "104.154.112.119")
}

func Staging() *gce.Instance {
	return MonitoringBase("skia-monitoring-staging", "104.154.112.117")
}

func main() {
	server.Main(gce.ZONE_DEFAULT, map[string]*gce.Instance{
		"prod":    Prod(),
		"staging": Staging(),
	})
}

package main

import (
	"go.skia.org/infra/go/gce"
	"go.skia.org/infra/go/gce/server"
)

func MonitoringBase(name, ipAddress string) *gce.Instance {
	vm := server.Server20170613(name)
	vm.DataDisk.SizeGb = 1000
	vm.DataDisk.Type = gce.DISK_TYPE_PERSISTENT_STANDARD
	vm.ExternalIpAddress = ipAddress
	vm.MachineType = gce.MACHINE_TYPE_HIGHMEM_16
	vm.Metadata["owner_primary"] = "jcgregorio"
	vm.Metadata["owner_secondary"] = "borenet"
	return vm
}

func Prod() *gce.Instance {
	return MonitoringBase("skia-monitoring", "35.202.138.145" /* Whitelisted in skia-master-db cloud DB */)
}

func Staging() *gce.Instance {
	return MonitoringBase("skia-monitoring-staging", "35.193.5.196")
}

func main() {
	server.Main(gce.ZONE_DEFAULT, map[string]*gce.Instance{
		"prod":    Prod(),
		"staging": Staging(),
	})
}

Use static IPs outside the 104.154.112.0/24 block in skia-monitoring
Use static IPs outside the 104.154.112.0/24 block in skia-monitoring

Bug: skia:6745
Change-Id: I96ea85d09055e5e32587b3bb0b525bb4f76fdc2d
Reviewed-on: https://skia-review.googlesource.com/38363
Reviewed-by: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
Commit-Queue: Ravi Mistry <9fa2e7438b8cb730f96b74865492597170561628@google.com>
