New version of the web application for administration of FreeIPA built using React and PatternFly 4.
You can read more about the plans here.
Note: these mockups are for general direction we're taking the Web UI. Some finer details and interactions will be worked out as we develop the application.
This project relies on Vagrant to set-up a virtual machine with FreeIPA installed and configured.
- Install requirements
Although these instructions target Fedora as host, any OS with Vagrant can be used,
sshfs
andlibvirt
are the preffered options, if you plan to use a different distro, please updateVagrantfile
accordingly.
$ sudo dnf install vagrant vagrant-libvirt vagrant-sshfs
-
Clone this repository
-
Start and provision the guest virtual machine:
vagrant up
-
Add guest machine's IP address to your
/etc/hosts
pointing to its hostname, e.g:
192.168.122.5 server.ipa.demo
You can get the VM ip for the running VM by:
vagrant ssh-config | grep HostName | awk '{print $2}'
At this point you can access your live instance at https://server.ipa.demo/ipa/ui/
.
However, you still need to configure your front-end environment, it's up to you to choose
between your host or guest machine.
If you decide to use your guest machine, just ssh into it, go to the synced folder:
$ vagrant ssh $ cd /usr/src/freeipa-webui/
Now you can install the project's dependencies:
$ npm install
To build (and watch the project for changes), run:
$ npm run start
You can serve the project using the following command:
$ npm run serve
You can also build and serve the project for production using the following command:
$ npm run build
Now your dev environment is ready, you can do changes and see them at:
https://server.ipa.demo/ipa/modern_ui/
The default credentials are admin and Secret123.
- Live reload is currently not available.
Integration testing uses Cypress library, which runs Gherkin-defined steps.
Warning
Never run integration tests on production server. Clean-up step would delete all existing entries, e.g. users.
- Prepare a vagrant server as in
Development Environment
- if you want to launch all the tests in headless mode, execute
$ npm run cypress
if you want to open graphical debugger, execute
$ npm run cypress:open
and select desired feature file you want to execute.
The integration tests use the .feature suffix and can be found in the tests subfolder, together with the steps describing each feature.
Unit tests use jest.
The existing tests can be launched by executing
$ npm run test
The unit tests live, where the component that is being tested lives, the name should be the same, only with the .test.tsx suffix instead.
If you require FreeIPA to be running, please use integration tests instead.