Skip to content

Commit 120a77f

Browse files
committed
update readme
1 parent 8a214ec commit 120a77f

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

README.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,52 @@
1-
# PHPIPAM Action
1+
# phpIPAM Action
22

33
[![CI](https://github.com/codeaffen/phpipam-action/actions/workflows/main.yml/badge.svg)](https://github.com/codeaffen/phpipam-action/actions/workflows/main.yml)
44
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/944893481cbb43dea9335f9605c30c7e)](https://www.codacy.com/gh/codeaffen/phpipam-action/dashboard?utm_source=github.com&utm_medium=referral&utm_content=codeaffen/phpipam-action&utm_campaign=Badge_Grade)
55

6-
This action Spin up a PHPIPAM instance for api testing purpose in github workflows.
6+
This action start a complete phpIPAM instance for api testing purpose in github workflows. \
7+
In detail the action start two containers:
78

8-
## Inputs
9+
* a mariadb container with a phpipam database
10+
* a phpipam container with a phpipam installation
911

10-
**note** Input parameters are not used yet in our action. They are for future use. We need to work on that feature.
12+
After that the action does a few things to prepare the phpipam installation:
1113

12-
### `ipam_database_host`
14+
* populate the database with a default data
15+
* activate the api
16+
* create a app for api connection
17+
* set required password change for defaut admin to _no_ - this is for local testing purposes
1318

14-
**optional** Database host phpipam connects to. Default: "database"
19+
## Parameters
1520

16-
### `ipam_database_user`
21+
---
22+
**Note:**
1723

18-
**optional** Database user phpipam needs to authenticate. Default: "phpipam"
24+
There are several parameters defined in readme. These parameters were currently not used but they are here for future use.
1925

20-
### `ipam_database_pass`
26+
---
2127

22-
**optional** Database password phpipam needs to authenticate Default: "phpipam"
28+
The parameters are prepared as follows:
2329

24-
### `ipam_database_name`
30+
* **ipam_database_host**: Database host phpipam connects to. Default: "database"
31+
* **ipam_database_user**: Database user phpipam needs to authenticate. Default: "phpipam"
32+
* **ipam_database_pass**: Database password phpipam needs to authenticate. Default: "phpipam"
33+
* **ipam_database_name**: Database name phpipam uses. Default: "phpipam"
34+
* **database_root_password**: Root password for the database. Default: "root"
2535

26-
**optional** Database name phpipam uses. Default: "phpipam"
36+
## Usage
2737

28-
### `database_root_password`
38+
The action is hosted in a separate repository and available on [github marketplace](https://github.com/marketplace/actions/phpipam-action){:target="_blank"}. To use it you have to add the following to your github workflow:
2939

30-
**optional** Root password for the database. Default: "root"
31-
32-
## Example usage
33-
34-
```yaml
40+
~~~yaml
3541
steps:
3642
- uses: actions/checkout@v2
3743
- uses: codeaffen/phpipam-action@v1
38-
with:
39-
ipam_database_host: 'database'
40-
ipam_database_user: 'phpipam'
41-
ipam_database_pass: 'phpipamadmin'
42-
ipam_database_name: 'phpipam'
43-
database_root_password: 'rootpw'
44-
```
44+
~~~
45+
46+
If the action finishes successfully you will be able to run your api tests against the phpipam installation.
47+
48+
~~~yaml
49+
- name: "Test phpipam api"
50+
run: |
51+
curl -k --user Admin:ipamadmin -X POST https://localhost/api/ansible/user/
52+
~~~

0 commit comments

Comments
 (0)