Difference between revisions of "Hostsgen"

From ProgClub
Jump to: navigation, search
 
(16 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
Why this software?
 
Why this software?
  
We want old hostnames to point to new host IP addresses when they are replaced.
+
We want old hostnames to point to new host IP addresses when they are replaced. We run this software to generate the /etc/hosts content for the settings for replaced hosts. Basically the old hostnames will point to the IP address of their replacement host.
  
 
= Administration =
 
= Administration =
Line 17: Line 17:
 
== Contributors ==
 
== Contributors ==
  
Non-members who have contributed to this project. Newest on top.
+
Programmers who have contributed to this project. Newest on top.
  
 
* Max Saker
 
* Max Saker
 
Members who have contributed to this project. Newest on top.
 
 
 
* [[User:John|John Elliot V]]
 
* [[User:John|John Elliot V]]
  
All contributors have agreed to the terms of the [[ProgClub:Copyrights#ProgClub_projects|Contributor License Agreement]]. This excludes any upstream contributors who tend to have different administrative frameworks.
+
All contributors have agreed to the terms of the [[ProgClub:Copyrights#ProgClub_projects|Contributor License Agreement]].
  
 
== Copyright ==
 
== Copyright ==
Line 37: Line 34:
 
== Components ==
 
== Components ==
  
Libraries, tools, services or media from third parties used under license:
+
Libraries, tools, services, or media from third parties used under license:
  
* Subversion
+
* [https://subversion.apache.org/ Subversion]
* Node.js
+
* [https://nodejs.org/en/ Node.js]
  
 
= Resources =
 
= Resources =
Line 64: Line 61:
 
== Links ==
 
== Links ==
  
N/A
+
* [https://www.json.org/json-en.html JSON]
  
 
= Specifications =
 
= Specifications =
Line 78: Line 75:
 
The technical specification describes how the project works.
 
The technical specification describes how the project works.
  
The software is a JavaScript script which runs via Node.js. It processes a JSON file as input and produces /etc/hosts compatible output. For example input see [https://www.progclub.org/pcrepo/hostsgen/branches/0.1/dat/test/good.json good.json].
+
The software is a JavaScript program which runs via Node.js. It processes a JSON file as input and produces /etc/hosts compatible output on stdout. For example input see [https://www.progclub.org/pcrepo/hostsgen/branches/0.1/dat/test/good.json good.json].
  
 
= Notes =
 
= Notes =
Line 88: Line 85:
 
If you are interested in incorporating this software into your project, here's what you need to know:
 
If you are interested in incorporating this software into your project, here's what you need to know:
  
  $ <code>svn co https://www.progclub.org/svn/pcrepo/hostsgen/branches/0.1 hostsgen-0.1</code>
+
  $ <code>svn checkout https://www.progclub.org/svn/pcrepo/hostsgen/branches/0.1 hostsgen-0.1</code>
 +
 
 +
Then run with:
 +
 
 +
$ <code>bin/hostsgen.sh /path/to/input.json</code>
  
 
== Notes for developers ==
 
== Notes for developers ==
Line 110: Line 111:
 
== Notes for administrators ==
 
== Notes for administrators ==
  
To release a version of this project use the software itself.
+
To release a version of this project use [[svnman]].
  
 
First, run maintenance and commit any changes:
 
First, run maintenance and commit any changes:

Latest revision as of 17:10, 25 June 2020

Hostsgen is the ProgClub /etc/hosts generation software. That's the software that generates /etc/hosts content for replaced hosts. For other projects see projects.

Status

We use semantic versioning. Latest production version: unreleased. Latest development version: 0.1.

Motivation

Why this software?

We want old hostnames to point to new host IP addresses when they are replaced. We run this software to generate the /etc/hosts content for the settings for replaced hosts. Basically the old hostnames will point to the IP address of their replacement host.

Administration

Contributors

Programmers who have contributed to this project. Newest on top.

All contributors have agreed to the terms of the Contributor License Agreement.

Copyright

Copyright © 2020, Contributors.

License

Licensed under the MIT license.

Components

Libraries, tools, services, or media from third parties used under license:

Resources

Downloads

There are no downloads for this project, see source code.

Source code

The repository can be browsed online:

https://www.progclub.org/pcrepo/hostsgen/branches/0.1

The latest stable released version of the code will be available from:

https://www.progclub.org/svn/pcrepo/hostsgen/tags/latest/0.1

Or if you want the latest version for development purposes:

https://www.progclub.org/svn/pcrepo/hostsgen/branches/0.1

Links

Specifications

Functional specification

The functional specification describes what the project does.

See: notes.txt.

Technical specification

The technical specification describes how the project works.

The software is a JavaScript program which runs via Node.js. It processes a JSON file as input and produces /etc/hosts compatible output on stdout. For example input see good.json.

Notes

See versioning for information on our semantic version numbers.

Notes for implementers

If you are interested in incorporating this software into your project, here's what you need to know:

$ svn checkout https://www.progclub.org/svn/pcrepo/hostsgen/branches/0.1 hostsgen-0.1

Then run with:

$ bin/hostsgen.sh /path/to/input.json

Notes for developers

If you're looking to set up a development environment for this project here's what you need to know.

Get the latest code from the version branch:

$ svn checkout https://www.progclub.org/svn/pcrepo/hostsgen/branches/0.1 hostsgen-0.1

You can then run the unit tests like this:

$ cd hostsgen-0.1 && bin/test/test.sh

Note that you may need to install some dependencies, such as:

# apt install nodejs subversion

Send your patch to jj5@progclub.org along with a statement that you are willing to be listed in the contributors section of the documentation and willing to license your contribution under the license and agree to the terms.

Notes for administrators

To release a version of this project use svnman.

First, run maintenance and commit any changes:

$ svnman commit

Then run the release:

$ bin/dev/release.sh

You will be prompted to update the project documentation.

Generated documentation

N/A at this time.