Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace ngircd with charybdis #11

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ to date as I change things / add features.

* Install puppet and puppetmaster (they can be on the same
server). 3.4.x+ is required.
* `puppet module install hunner-charybdis` *on the puppetmaster*
* `puppet module install jfryman-nginx`
* `puppet module install camptocamp-postfix`
* Set up hiera:
* add a [hiera.yaml](https://github.com/nathanielksmith/puppet-tilde/tree/master/examples/hiera.yaml) to `/etc/puppet/`
* `ln -s /etc/puppet/hiera.yaml /etc/hiera.yaml`
* `mkdir /etc/puppet/hieradata`
* add and **configure** [common.yaml](https://github.com/nathanielksmith/puppet-tilde/tree/master/examples/common.yaml) to `/etc/puppet/hieradata/`
* also add and **configure** [common.yaml](https://github.com/nathanielksmith/puppet-tilde/tree/master/examples/common.yaml) to `/etc/puppet/hierdata/node/[yourhostfqdn].yaml`
* `cd /etc/puppet/modules`
* `git clone https://github.com/nathanielksmith/puppet-tilde.git tilde`
* `git clone https://github.com/nathanielksmith/puppet-ngircd ngircd`
* edit [site.pp](https://github.com/nathanielksmith/puppet-tilde/tree/master/examples/site.pp) and save to `/etc/puppet/manifests/site.pp`
* `puppet agent -t`

Expand Down Expand Up @@ -70,16 +71,12 @@ or _tilde.farm_ or _drawbridge.club_) and sets up an nginx vhost with:

## IRC

The module sets up ngircd for you.
The module sets up the charybdis IRC server for you.

* localhost only
* "irc" alias added to users' .bashrc
* per-user irssi config this will auto-connect to the
server and auto-join #<hostname> where hostname is a .-less string
substitution of the hostname you specified as `tilde::hostname`.
* per-user irssi config this will auto-connect to the server and auto-join #<hostname> where hostname is a .-less string substitution of the hostname you specified as `tilde::hostname`.

It does **not** set up an operator. IRC governance is up to the
autonomous collective to determine.
Your localhost root user will have OPER privileges in IRC, using the password you configured in your `[yourhostfqdn].yaml` or `common.yaml` file.

## Mail

Expand Down Expand Up @@ -151,6 +148,7 @@ or configure common.yaml with

* Nathaniel Smith <[email protected]>
* Chris Roddy <[email protected]>
* Jason Levine <[email protected]>

## License

Expand Down
7 changes: 5 additions & 2 deletions examples/common.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# REQUIRED. This sets up the webserver.
tilde::hostname: tilde.town
# REQUIRED. This is used to set up a few of the servers (web, IRC, NNTP).
tilde::hostname: your.new.fqdn

# REQUIRED. This is used in the IRC server setup.
tilde::irc::rootoperpass: example

# OPTIONAL. This allows you to customize the package listing for your
# server. The default packages are in manifests/packages.pp.
Expand Down
1 change: 1 addition & 0 deletions examples/hiera.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# You should be able to copy this wholesale. Just don't forget to
# mkdir /etc/puppet/hieradata.
:hierarchy:
- "node/%{::fqdn}"
- common

:backends:
Expand Down
5 changes: 4 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
include tilde::packages
include tilde::mail
include tilde::skel
include tilde::irc

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird indentation?

class {'tilde::irc':
hostname => $hostname
}

class {'tilde::nntp':
hostname => $hostname,
Expand Down
83 changes: 77 additions & 6 deletions manifests/irc.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,84 @@
class tilde::irc {
class tilde::irc ($hostname, $rootoperpass) inherits charybdis {

# substituted in in the irssi default config file for users
$channel = regsubst($tilde::hostname, '\.', '')

class { 'ngircd':
server_name => 'localhost',
dns => 'no',
class { 'charybdis::serverinfo':
server_name => "${hostname}",
server_id => '99Z',
server_description => 'tilde charybdis server',
network_name => 'tilde.club',
network_description => 'your very own network!',
hub => true,
ssl_cert => '/etc/charybdis/test.cert',
ssl_private_key => '/etc/charybdis/test.key',
ssl_dh_params => '/etc/charybdis/dh.pem',
ssld_count => '1',
max_clients => '1024',
restartpass => "notused",
diepass => "notused"
}
class { 'charybdis::admin':
adminname => 'Tilde Node Administrator',
description => 'node IRC administrator',
email => 'admin@node'
}
charybdis::listen { 'default':
port => '6665 .. 6669',
sslport => '6697'
}
charybdis::operator { 'root':
users => [ '[email protected]/8' ],
privset => 'admin',
password => "${rootoperpass}",
snomask => '+Zbfkrsuy',
flags => [ '~encrypted' ]
}
class { 'charybdis::cluster':
clustername => '*.tilde.club'
}

ngircd::server { 'internal':
host => 'localhost',
# set up our auth sections
charybdis::auth { 'localhostusers':
order => '2',
users => '*@127.0.0.0/8',
authclass => 'users'
}

include charybdis::log
include charybdis::default::alias
include charybdis::default::channel
include charybdis::default::general
include charybdis::default::modules
include charybdis::default::privset
include charybdis::default::serverhide

# set up our user classes
charybdis::class { 'users':
ping_time => '2 minutes',
number_per_ident => '10',
number_per_ip => '1024',
number_per_ip_global => '1024',
cidr_ipv4_bitlen => '24',
cidr_ipv6_bitlen => '64',
number_per_cidr => '1024',
max_number => '3000',
sendq => '400 kbytes'
}
charybdis::class { 'opers':
ping_time => '5 minutes',
number_per_ip => '256',
max_number => '1024',
sendq => '1 megabyte'
}
charybdis::class { 'server':
ping_time => '5 minutes',
connectfreq => '5 minutes',
max_number => '24',
sendq => '4 megabytes'
}

charybdis::exempt { 'default': }
charybdis::shared { 'default': }

}