1,549 karma · joined Dec 5, 2012 (13y ago) · 595 submissions
comment 10y ago · link · parent
Previous HN discussion: https://news.ycombinator.com/item?id=11492070
(I have tested the predecessor (gen3) and liked it. I'm waiting for the 16GB gen4 X1 Carbon to become available here in Germany, drop enough in price to be affordable, and for Linux to support all the C-states.)
comment 10y ago · link · parent
(The right way to do this would be to add a feature to the HN/reddit forum software that allows unobtrusive footnotes to comments. Acronyms could just be auto-hyperlinked (with short definition in the alt text) in the original comment.)
comment 10y ago · link · parent
1. Playbooks are executable documentation that's concise, accurate and doesn't rot away as fast. And no one can put off writing it.
2. If you keep them in git, you'll later have a history of what changed when - and who did it!
3. Your servers will stay consistent. Less trying to debug why server X behaves differently than server Y. No more forgetting one server when doing mass changes.
4. Your members will need to learn one less thing specific to your infrastructure.
5. Your members may learn something useful. It's a CS student council, they should be able to pick it up. And they don't need to understand it completely right away. (I know that's a controversial thing to say in university circles ;) Copy/paste + knowing how to run it should be enough at first.
6. Once you have it in place, you can still decide if you want to automate more things -- or not!
7. Why Ansible in particular: no server side software, leaves no trace on server -> you can always just stop using it.
Note: It's totally ok to not do everything but just the common things in config management.
Here's a hopefully complete (but untested) example optimized for beginner-friendlyness, just to give you an example. It's shorter than your code!
# On workstation, nothing extra is needed on servers (well, except Python):
dnf install ansible
# Put your own SSH key on the servers manually.
# File "site.yml":
---
- hosts: all # "all", or a hostname, or a groupname
vars_files:
- keys.yml
tasks: # always executed in the order they're written
- authorized_key: user="root" key="{{ item }}" state=present # use state=absent to remove keys
with_items: user_keys["Alice"]
- authorized_key: user="root" key="{{ item }}" state=present
with_items: user_keys["Bob"]
# File "keys.yml":
---
user_keys:
Alice:
- "ssh-rsa AAA....."
- "ssh-rsa AAA....."
Bob:
- "ssh-rsa AAA....."
- "ssh-rsa AAA....."
# File "hosts":
[my_hosts] # This line is optional. It groups hosts.
demo-host ansible_host=10.11.12.13 ansible_ssh_user=root
# Deploy:
ansible-playbook -i hosts site.yml
# Run it, but make it not change anything on the servers:
ansible-playbook -i hosts site.yml --check
Wasn't so hard, was it?comment 10y ago · link · parent
2. If the certificate is ever compromised, you'll have to keep it in the revocation list forever, or replace the entire CA.
(And I hope your CA contains a DNS name restriction.)
comment 10y ago · link · parent
_Renewal doesn't touch any config files at all._ "letsencrypt-auto" puts the certs/keys under /etc/letsencrypt/keys. On renewal, new files get added. Old files are never touched. /etc/letsencrypt/live contains symlinks to the most recent files. Your webserver config uses these => its config does not need to be changed for renewal.
What you're talking about is only the initial certificate installation with "letsencrypt-auto run", and it makes a very targeted change in your Apache config. Use etckeeper if you don't trust it. If you still don't want that, use "letsencrypt-auto certonly".
(Note on server restarts: It also supports multiple methods, one of which is the webroot method, with which letsencrypt-auto does the challenge by putting a file under .well-known/acme-challenge/ of your webroot and lets your webserver handle the request, so it doesn't need to restart/replace your webserver itself.)
And about all these "minimalistic tools": I've seen one that literally did "new-cert.sh > $cert-file". If it failed (e.g. due to ratelimit, no internet connectivity, ...), it would null your old cert! Written and used by very smug people.
comment 10y ago · link · parent
That's exactly what I meant with lawyers<->nerds: publishing a radically different version is a nice hack, but may not hold up legally.
> but at that point we're well into moot, counterfactual realms.
That's what I meant with confusion. If the legal situation isn't entirely clear, the kernel team, distros and related companies might very well decide to play it safe.
comment 10y ago · link · parent
Though of course since laws are made by lawyers and not nerds, the new license may well be invalid and nothing would change at all except for lots of confusion.
Which makes you even more right.
comment 10y ago · link · parent
Explanation:
Use a recent ssh version (if you've updated in February you're safe), or put in your .ssh/config file:
# CVE-2016-0777
UseRoaming no
Additionally, while you are at it, you can take care of some privacy problems. These are really not a big deal though.Don't hand your SSH public key to the server:
# Makes SSH not try other keys than ~/.ssh/id_{dsa/ecdsa/rsa}.
IdentitiesOnly yes
# And move ~/.ssh/id_{dsa/ecdsa/rsa}{,.pub} somewhere else,
# including it on a per host basis:
Host *.example.com example.com
IdentityFile ~/.ssh/my_id_rsa
Or you could just disable pubkey authentication for this one connection with ssh -o "PreferredAuthentications=password,keyboard-interactive".Including root@ prevents leaking your local username.
If in doubt, man ssh + man ssh_config (they contain other useful things like "CanonicalizeHostname yes / CanonicalDomains ycombinator.com" / example: ssh root@news).
(I don't know what's wrong with the internet that we need "how to SSH" posts now, though. But here it is.)
comment 10y ago · link · parent
Such as:
https://en.wikipedia.org/wiki/Samsung_SGR-A1
Quote:
"identify and shoot a target automatically from over two miles (3.2 km) away."
There are some scary videos of it on the internet.
comment 10y ago · link · parent
But as soon as scripting is supported, it's impossible to write tools that process the config files and always work, especially with untrusted config files. You can't have both.
So the question is: can code be separated from config (like I've proposed above) (the code can still be inlined in the config file, as long as the "root" of the config file is declarative and the boundaries are well-defined)?
If no, which is more important: parseability or flexibility? It's a tradeoff.
comment 10y ago · link · parent
1. Lack of adption: It's not widely used yet. Implementations for few languages.
2. No formal spec; the "spec" is very imprecise and seems to try very hard to leave as much as possible to the implementation.
3. The spec is very, very Java specific. No clear separation between "core HOCON" and "Java extensions".
4. It probably doesn't lend itself well to automatic changes in a way that preserves structure of an original file (-> without just rendering out JSON).
It's clear that HOCONs only real focus is being easy to edit manually.
It's a nice idea, but it's definitely not the long term solution we need.
comment 10y ago · link · parent
No! Turing complete config files are even worse than ad-hoc config files.
If your config format is turing complete, you couldn't correctly modify config files automatically. (You wouldn't even know how long until you're done evaluating it.)
If you need more logic, put it in your program or have a plugin system or write a program that generates the config file, but don't put it in the config file.
comment 10y ago · link · parent
But your complexity comparison is unfair. Ad-hoc file formats are overwhelming. Users don't see the complexity because there is no spec and they just write config files by example. Developers generally either give up or write something that doesn't behave quite the same. A fair comparison would be:
""""
XML looks like this:
<section>
<subsection>
<key>value</key>
</subsection>
</section>
"""
That's about the level of detail in the documentation of most ad-hoc file formats I've seen. Followed by hundreds of examples that happen to show (but not specify) special cases.comment 10y ago · link · parent
We have different shells with different expansions (and a myriad other differences) and it doesn't work well.
In practice, the result is that people write bash scripts, not shell scripts.
(Though they often don't know, and so use #!/bin/sh anyway, and so the scripts break whenever the default shell isn't bash.)
comment 10y ago · link · parent
comment 10y ago · link · parent
I think the real problem is config files either in hard-to-parse-correctly custom ad-hoc formats or even "config files" written in a scripting language (-> impossible to parse).
All config files should use the same standard format. I'd say "like YAML", but I'm not aware of a widely-used format with standard features like file includes or data types beyond "int" and "string" (e.g. for time intervals; these really shouldn't be "just a string... with a custom format").
comment 10y ago · link · parent
Even ads in magazines aren't there to "inform" people.
"Informing" would be objective. Ads are meant to show the product in the best possible light and get people to buy them.