This repository contains configurations and scripts required to empower a Polyflix developer environment (a.k.a, devkit). It allow maintainers and contributors to easily run and develop the platform on a Kubernetes cluster, without having to worry about the deployment and configuration steps.
Currently, the devkit can only be used on a Unix based operating system, such as Ubuntu, Debian or MacOS.
When dealing with local
engine for the Kubernetes cluster, performance may be considerably decreased than a cloud-provider based Kubernetes cluster such as openstack
, because of the underlying usage of k3d.
- kubectl
- helm
- Helmfile
- Helm-diff
- Terraform
- k3d (optional, only when dealing with
local
engine) - devspace (optional, only for Kubernetes development)
For people that are interested about running the devkit using the openstack
engine, you will need to have a credentials file.
To start a new devkit, run :
# valid engines are: local, openstack
./devkit.sh start <engine>
Note: when using the
openstack
engine, source the credentials file to allow Terraform to auto-configure the provider.source /path/to/credentials.rc
To stop it (be careful, all data will be lost !), run :
# valid engines are: local, openstack
./devkit.sh stop <engine>
Once done, the Polyflix API should be accessible on the following URL: http://polyflix.local/api. You only need to run the front-end locally, by using the devkit
environment. Please refer to the front-end documentation for more information.
Below are the applications that are exposed :
- http://kibana.polyflix.local
- http://keto.polyflix.local
- http://keycloak
- http://minio
- http://console.minio.polyflix.local
- http://polyflix.local/api
To make your developer journey for Polyflix easier, you can add an alias to the devspace
command to always use the good devkit cluster :
echo "alias devspace=\"KUBECONFIG=/absolute/path/to/devkit/outputs/k8s.yml\" devspace" >> ~/.zshrc
Every project has a devspace.yaml
file. To enable development in the cluster, just run the command :
devspace dev
This will open a remote shell inside a devspace pod in the cluster. You can now use your commands to run the project, such as mvn spring-boot:run
or npm start
.
To reset the service to the default image, exit the remote shell and run :
devspace purge
- Email: administrator@polyflix.local / Password: administrator
- Email: contributor@polyflix.local / Password: contributor
- Email: member@polyflix.local / Password: member
- Username: polyflix
- Password: polyflix
- Username: postgres
- Password: polyflix
- Username: polyflix
- Password: polyflix