WARNING:
This project is out of date and needs to be improved and migrated to Kustomize.
Summary:
These manifests are used to deploy an instance of the Unifi Controller.
Approximate Deployment Time: 10-15 minutes
Requirements:
- Load Balancer integration so that the Service can expose the pods.
- NFS Server to which Kubernetes can bind Persistent Volumes.
- Directory structsure created on the NFS Endpoint you specify in
vars.yml
. - Python modules required to use the k8s Ansible module.
- pip install openshift kubernetes pyyaml
- If you're on MacOS, you might have to do this instead.
Instructions:
Optional:
- Export a backup of your existing Unifi Controller settings to a .unf file.
- If you plan on running the controller on a different network than your AP's, you can likely set DHCP options for remote discovery on your router. Instructions can be found here.
Required:
- Modify
vars.yml
with parameters according to your environment. - Create the necessary directories defined in
vars.yml
on your NFS server. - Stop any existing Unifi Controllers on the same network.
- Execute the playbook:
ansible-playbook provision.yml
. - Navigate to https://host.name:8443/ to access the software.
- If you took a backup, feel free to restore it. You will need to delete your devices, however, as the relationship will have been broken.
- Devices -> Device -> Config -> Manage Device -> Forget
- Reset your Ubiquiti devices to factory defaults.
- SSH into your Unifi Devices and manually inform the controller of their existence.
set-inform http://>{IP,HOSTNAME}<:8080/inform
- After a few moments, your devices will appear in the Controller. Click Adopt and configure away.
- If your devices get stuck in an Adopting -> Disconnected loop make sure that your
Controller Hostname/IP
is configured correctly in the settings. This should automatically be set by thesystem.properties
injection, however. You can test this by SSHing into the device and trying to resolve the Unifi Controller LB IP/DNS.
- If your devices get stuck in an Adopting -> Disconnected loop make sure that your
TODO:
- Test to see if password allows for special characters correctly.
- Figure out a way to allow this to scale to more than one pod.
- Load Balancing the controller does not appear to be supported.
- Create init container to enforce that Unifi Controller does not start up before Mongo is ready.
Deletion:
- You can roll back this deployment with the
delete.yml
playbook:ansible-playbook delete.yml
.- Please note, this will not remove the deployed namespace because I could not be sure you didn't specify an existing namespace. I would hate to delete your
default
for example. So you must manually clean that up.kubectl delete ns >namespace name<
- Please note, this will not remove the deployed namespace because I could not be sure you didn't specify an existing namespace. I would hate to delete your