Skip to content

Commit

Permalink
Bump version to v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Bishop committed Feb 15, 2015
1 parent 4c47691 commit 158048f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
## Powr

Web UI frontend for PowerDNS API interface
Web UI frontend for PowerDNS API interface.

The project's aims are:
- simplicity: cover the basic operations that most people use
- easy of installation: There are no 3rd party dependencies - everything required is bundled in the release package.

Powr is made up of browser-based Javascript (written in AngularJS) and a proxy/webserver backend (written in Go) which a) serves the static content b) proxies the API requests to/from PowerDNS backend. The `powr` server is available as a pre-compiled binary for Linux amd64 so no compilation is required.

***Work in progress - Use at your own risk***

Current features:
### Features

Currently supported DNS operations:

- view, add zones
- view, add, delete, edit zone records
Expand All @@ -13,26 +21,35 @@ Current features:

View a live demo at [http://porjo.github.io/powr](http://porjo.github.io/powr)

The demo uses a mock backend.
The demo runs entirely in your browser, and uses a mock backend.

### Web Server
### Usage

PowerDNS authoratative server versions prior to v3.4.2 do not support CORS which means that browser-based Javascript cannot talk directly to it. Powr includes a simple web server to a) server static files b) proxy JSON API requests to PowerDNS backend.
1. Configure your PowerDNS server to enable the API. For the authoratative server, that means adding the following to your `pdns.conf`:
```
experimental-json-interface=yes
webserver=yes
webserver-address=0.0.0.0
experimental-api-key=changeme
```

### Usage
Consult the PowerDNS [documentation](http://doc.powerdns.com/md/httpapi/README/) for more information.

Grab a [current build](https://github.com/porjo/powr/releases) and untar it somewhere convenient.
2. Grab a [current build](https://github.com/porjo/powr/releases) and unpack the HTML files and proxy/webserver somewhere convenient.

Run the web server like so:
3. Run the proxy/webserver like so:
```
./powr -d dist/ -pdnsAPIKey=changeme -pdnsHost=myserver -pdnsPort=8081
```

Point your browser to `http://localhost:8080`
4. Point your browser to `http://localhost:8080` (or whatever IP/hostname your server has)

*That's it!*

### Development

1. Clone this repo somewhere convenient:`git clone https://github.com/porjo/powr.git .`
1. Clone this repo somewhere convenient: `git clone https://github.com/porjo/powr.git .`
1. Pull the necessary dependencies using npm and bower e.g. `npm install` + `bower install`
1. Build the html/css/js with `grunt build-dist`. Static content is located under `/dist`
1. Build the `powr` webserver binary with `go build`
1. Run `grunt-watch` to automatically populate the contents of `/dist` anytime a change is made
1. Edit AngularJS project files under `/src`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powr",
"version": "0.2.0",
"version": "0.3.0",
"description": "PowerDNS API Frontend",
"main": "src/app.js",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion powr.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (sr *html5mode) WriteHeader(status int) {

func (p *pdnsBackend) Setup() {
p.Director = func(req *http.Request) {
req.Header.Set("X-API-Key", pdns.Key)
req.Header.Set("X-API-Key", p.Key)
req.Host = p.Host
req.URL.Scheme = "http"
req.URL.Host = fmt.Sprintf("%s:%d", p.Host, p.Port)
Expand Down

0 comments on commit 158048f

Please sign in to comment.