Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 0 additions & 186 deletions .github/workflows/release_dim_web.yml

This file was deleted.

78 changes: 30 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## DIM - DNS and IP Management (and also DHCP)
# DIM - DNS and IP Management (and also DHCP)

DIM can be used as IP Management for a companies whole IP address space (e.g. RFC1918, public IPv4, ULA IPv6, public IPv6 (GUA), Multicast IPs, ...).

Expand All @@ -10,23 +10,28 @@ DIM simplifies the steps "mark ip as used, create forward record, create reverse

DIM provides an API to allow products to consume and return single IPv4 addresses or whole /64 or /56 prefixes for IPv6.

# Quickstart / Tutorial
## Quickstart / Tutorial

Download [VM](https://github.com/ionos-core/dim/releases/download/vm-1.0/dim-4-0-9.qcow2) ([Documentation](VM-SETUP.md) how the VM was created). The VM is preconfigured including PowerDNS and PowerDNS recursor so that you
can immediately check whether your commands had effects.

Read [Tutorial](TUTORIAL.md) to see how DIM can be used to document Prefixes and manage DNS Records.

# Docker
## Docker

Docker files are available for below components, and you need to do docker build on your own (There is no pre build docker version at this moment)

## DIM
### DIM

Just mount your dim.cfg to `/etc/dim/dim.cfg`

[Docker file](./dim/Dockerfile)

## Ndcli
### ndcli

To build ndcli you need to be in project directory; because there is dependecy to dimclient
```

```sh
docker build -f ndcli/Dockerfile .
```

Expand All @@ -38,42 +43,17 @@ docker build -f ndcli/Dockerfile .
[Docker file](./ndcli/Dockerfile)

## PDNS Output

Mount configuratin to `/etc/dim/pdns-output.properties`

[Docker file](./pdns-output/Dockerfile)

## DIM-Cas

Mount configuratin to `/etc/cas/cas.cfg`

[Docker file](./dim-cas/Dockerfile)

## DIM-Web
You have to define below args during build
| ARG | Description |
| --- | --- |
| DIM_LOGIN | point to dim login url |
| DIM_RPC | dim jsonrpc url |
| LOGIN | dim-cas login url |
| LOGOUT | dim-cas logout url |

Docker build example:
```
docker build --progress=plain \
--build-arg DIM_LOGIN=http://dim-nginx:8000/login \
--build-arg DIM_RPC=http://dim-nginx:8000/jsonrpc \
--build-arg LOGIN=http://dim-nginx:8000/dim-cas/ \
--build-arg LOGOUT=http://dim-nginx:8000/dim-cas/logout \
--build-arg BASE_URL=/web \
.
```

[Docker file](./dim-web/Dockerfile)

## Docker compose (All-in-One)
Project contains one compose file which contains all dim components and compose file is located in [here](./docker/compose.yaml)

There is an [all-in-one compose file](./docker/compose.yaml) which contains all DIM components.

### Components

- pdns-int: powerdns instance for internal zones
- pdns-pub: powerdns instance for external zones
- pdns-rec: required for powerdns_auth
Expand All @@ -82,47 +62,49 @@ Project contains one compose file which contains all dim components and compose
- pdns_int for pdns-int
- pdns_out for pdns-out
- dim: dim core component
- dim-nginx: nginx proxy to proxypass different paths to different components. [Config gile](./docker/conf/dim-nginx.conf)
- dim-web: GUI interface for dim which use dim-cas for authentication
- dim-cas: CAS authentication relay to cas
- dim-nginx: nginx proxy to proxypass different paths to different components. [Config file](./docker/conf/dim-nginx.conf)
- pdns-output: Write dim zones and changes to powerdns databases
- cas: authentication server with ldap backend
- openldap: openldap server for dim and cas
- phpldapadmin: good to have some gui for ldap:)
- openldap: openldap server for dim
- phpldapadmin: good to have some gui for ldap
- ndcli: dim cli client


to setup docker deployment:
```

```sh
cd docker
docker compose up -d
```

Init dim database
```

```sh
docker compose exec -it dim bash
./manage_db init
exit
```

Before set a user to role `Admin` you need to login to create user in dim database
Use web gui or ndcli to login
```
Use ndcli to login

```sh
docker compose exec ndcli ndcli login --username john1 --password P@ssw0rd
```

To set an user's role to `Admin`
```

```sh
docker compose exec -it dim bash
./manage_dim set_user -u john1 -t Admin
```

***Notes:***

- There is no data presistance, you should modify docker compose for your needs
- The default listen url is http://dim-nginx:8000 and you have to add this url to your /etc/hosts file to reach service from localhost.
- The default listen url is <http://dim-nginx:8000> and you have to add this url to your /etc/hosts file to reach service from localhost.
- Default docker network is on 10.10.0.0/16 and for required communication every containers have a assigned ip address in docker compose

### Default users

You can add new users with openldap or use below users to interact with dim

| Username| Password |
Expand Down
Loading