-
Notifications
You must be signed in to change notification settings - Fork 100
Deploy Lightwave on GCE
Pre-requisites
- Please follow GCE's gcloud SDK install guide @ https://cloud.google.com/sdk/downloads so that you can manipulate your GCE VM instances with gcloud CLIs including establishing SSH connections to your GCE VM instances.
- With Photon OS
- 1. Set up firewall rules
* For lightwave DNS we need open protocols and port: **udp:53, tcp:53**
* For lightwave ldap we need open protocols and port: **udp:389 tcp:389 udp:636 tcp:636**
* For lightwave sts we need open protocols and port: **tcp:443**
* For lightwave rpc and others we need open protocols and port: **tcp:88 tcp:88 tcp:2012 tcp:2014 tcp:2020**
- 2. Upload PhotonOS base image built for GCE
* Upload image to Google Storage: go to 'Storage' to create a bucket under your project and upload your image there. * Create customer image: go to 'images' and select 'create an image', where you choose 'cloud storage file' and pick the PhotonOs image you upload previously.
- 3. Launch a PhotonOS instance
You should be able to choose '1G' memory, and make sure you choose 'customer image' and browse to your project and choose the PhotonOS image you uploaded in step 2. Click to enable 'http/https'.
Set the following in the startup script section
hostname $(curl --silent http://metadata.google.internal/computeMetadata/v1/instance/attributes/hostname" -H "Metadata-Flavor: Google")
Next, click on the VM instance launched in step 3 and click 'edit' and browse to "Custom metadata" and add two properties:
hostname = FQDN of your host, for instance, "lw-dc01.photon.local'
- 4. Configure your instance with the right hostname
From the gcloud shell, ssh into the newly formed instance
gcloud compute --project "lightwave-fu" ssh --zone "us-west1-a" "lightwave-dc01" Update the /etc/hosts file with the following entry
<ip-addr></ip-addr> <fqdn></fqdn> <short-name></short-name> (use ifconfig to determine your instance's ip address)
For example
10.138.0.6 lw-dc01.lightwave.local lw-dc01
Verify that the instance records the short name and fqdn correctly
Run the following commands
$hostname lw-dc01
$hostname -f lw-dc01.photon.local
- 5. Configure the host to use the first lightwave as its DNS
- Make sure you run**
systemctl restart systemd-networkd; systemctl restart systems-resolved
to allow network/hostname configuration take effect on your VM instance.
- 6. Install lightwave
sudo su tdnf makecache tdnf install -y commons-daemon-1.0.15-8.ph1 openjre-1.8.0.112 apache-tomcat-8.5.8 (Require a specific version of 3rd dependency will be fixed in future lightwave server release) tdnf install -y vmware-lightwave-server-1.2.0
- 7. Promote your first lightwave domain controller
* /opt/vmware/bin/configure-lightwave-server --domain <domain></domain> --password <password></password>
- 8. Deploy 2nd lightwave instance joining to lightwave domain
- 9. Promote your second lightwave domain controller
* /opt/vmware/bin/configure-lightwave-server --domain <domain></domain> --password <password></password> --server <1st_lightwave_server_fqdn>
You can choose to bring up more lightwave domain controllers in the same lightwave domain by repeating step 8 and 9 above.
- With Ubuntu
- Configure the firewall
- Prepare the host image using Ubuntu 17.04
- Set the hostname using step 4 of Photon installation
- Download Ubuntu packages for lightwave and cyrus_sasl packages from vmware bintray
- Promote the host instance as a domain controlle