-
suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?https://docs.ansible.com/ansible/

Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
Ansible’s main goals are simplicity and ease-of-use. It also has a strong focus on security and reliability, featuring a minimum of moving parts, usage of OpenSSH for transport (with an accelerated socket mode and pull modes as alternatives), and a language that is designed around auditability by humans–even those not familiar with the program.
Ansible works against multiple systems in your infrastructure at the same time. It does this by selecting portions of systems listed in Ansible’s inventory, which defaults to being saved in the location /etc/ansible/hosts
The inventory file can be in one of many formats, depending on the inventory plugins you have. For this example, the format for /etc/ansible/hosts is an INI-like (one of Ansible’s defaults) and looks like this:mail.example.com [webservers] foo.example.com bar.example.com [dbservers] one.example.com two.example.com three.example.com
Arbitrary example.
Let’s use Ansible’s command line tool to reboot all web servers in Atlanta, 10 at a time.$ ansible atlanta -a "/sbin/reboot" -f 10
You can also select what Ansible “module” you want to run.
Using the shell - Execute commands in nodes. module looks like this:$ ansible atlanta -m shell -a 'echo $TERM'
Here’s another use case for the /usr/bin/ansible command line. Ansible can SCP lots of files to multiple machines in parallel.
To transfer a file directly to many servers:$ ansible atlanta -m copy -a "src=/etc/hosts dest=/tmp/hosts"
While you might run the main /usr/bin/ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec.
Playbooks can declare configurations, but they can also orchestrate steps of any manual ordered process, even as different steps must bounce back and forth between sets of machines in particular orders. They can launch tasks synchronously or asynchronously.
Playbooks are expressed in YAML format (see YAML Syntax) and have a minimum of syntax, which intentionally tries to not be a programming language or script, but rather a model of a configuration or a process.
The goal of a play is to map a group of hosts to some well defined roles, represented by things ansible calls tasks. At a basic level, a task is nothing more than a call to an ansible module
For starters, here’s a playbook that contains just one play:--- - hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: ensure apache is at the latest version yum: name=httpd state=latest - name: write the apache config file template: src=/srv/httpd.j2 dest=/etc/httpd.conf notify: - restart apache - name: ensure apache is running (and enable it at boot) service: name=httpd state=started enabled=yes handlers: - name: restart apache service: name=httpd state=restarted
Playbooks can contain multiple plays. You may have a playbook that targets first the web servers, and then the database servers. For example:--- - hosts: webservers remote_user: root tasks: - name: ensure apache is at the latest version yum: name=httpd state=latest - name: write the apache config file template: src=/srv/httpd.j2 dest=/etc/httpd.conf - hosts: databases remote_user: root tasks: - name: ensure postgresql is at the latest version yum: name=postgresql state=latest - name: ensure that postgresql is started service: name=postgresql state=started
Please consider the environment before printing this message, 50% of the above is useless!-
Re: suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?Scritto daNon Autenticatoil 2017-07-02 22:29:08.0 alle 2017-07-02 22:29:08.0Scritto da: dada216
> https://docs.ansible.com/ansible/
>
>
> Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
>
> Ansible’s main goals are simplicity and ease-of-use. It also has a strong focus on security and reliability, featuring a minimum of moving parts, usage of OpenSSH for transport (with an accelerated socket mode and pull modes as alternatives), and a language that is designed around auditability by humans–even those not familiar with the program.
>
> Ansible works against multiple systems in your infrastructure at the same time. It does this by selecting portions of systems listed in Ansible’s inventory, which defaults to being saved in the location /etc/ansible/hosts
>
> The inventory file can be in one of many formats, depending on the inventory plugins you have. For this example, the format for /etc/ansible/hosts is an INI-like (one of Ansible’s defaults) and looks like this:
>> mail.example.com > > [webservers] > foo.example.com > bar.example.com > > [dbservers] > one.example.com > two.example.com > three.example.com > >
>
>
>
> Arbitrary example.
>
> Let’s use Ansible’s command line tool to reboot all web servers in Atlanta, 10 at a time.
>> $ ansible atlanta -a "/sbin/reboot" -f 10
>
>
> You can also select what Ansible “module” you want to run.
>
> Using the shell - Execute commands in nodes. module looks like this:
>
>$ ansible atlanta -m shell -a 'echo $TERM' >
>
> Here’s another use case for the /usr/bin/ansible command line. Ansible can SCP lots of files to multiple machines in parallel.
>
> To transfer a file directly to many servers:
>
>
>$ ansible atlanta -m copy -a "src=/etc/hosts dest=/tmp/hosts" >
>
>
> While you might run the main /usr/bin/ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec.
>
>
> Playbooks can declare configurations, but they can also orchestrate steps of any manual ordered process, even as different steps must bounce back and forth between sets of machines in particular orders. They can launch tasks synchronously or asynchronously.
>
>
> Playbooks are expressed in YAML format (see YAML Syntax) and have a minimum of syntax, which intentionally tries to not be a programming language or script, but rather a model of a configuration or a process.
>
> The goal of a play is to map a group of hosts to some well defined roles, represented by things ansible calls tasks. At a basic level, a task is nothing more than a call to an ansible module
>
> For starters, here’s a playbook that contains just one play:
>--- > - hosts: webservers > vars: > http_port: 80 > max_clients: 200 > remote_user: root > tasks: > - name: ensure apache is at the latest version > yum: name=httpd state=latest > - name: write the apache config file > template: src=/srv/httpd.j2 dest=/etc/httpd.conf > notify: > - restart apache > - name: ensure apache is running (and enable it at boot) > service: name=httpd state=started enabled=yes > handlers: > - name: restart apache > service: name=httpd state=restarted >
>
> Playbooks can contain multiple plays. You may have a playbook that targets first the web servers, and then the database servers. For example:
>
>--- > - hosts: webservers > remote_user: root > > tasks: > - name: ensure apache is at the latest version > yum: name=httpd state=latest > - name: write the apache config file > template: src=/srv/httpd.j2 dest=/etc/httpd.conf > > - hosts: databases > remote_user: root > > tasks: > - name: ensure postgresql is at the latest version > yum: name=postgresql state=latest > - name: ensure that postgresql is started > service: name=postgresql state=started > >
>
Chissà se può risolvere l'annoso problema dei backup, che tanto mi spaventa.-
Re: suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?Scritto da:
>
> Chissà se può risolvere l'annoso problema dei backup, che tanto mi spaventa.
no, serve a tutt'altro.
che cosa devi backuppare? linux, windows? insulae?Please consider the environment before printing this message, 50% of the above is useless!-
Re: suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?Scritto daNon Autenticatoil 2017-07-03 00:12:31.0 alle 2017-07-03 00:12:31.0Scritto da: dada216
> Scritto da:
> >
> > Chissà se può risolvere l'annoso problema dei backup, che tanto mi spaventa.
>
> no, serve a tutt'altro.
>
> che cosa devi backuppare? linux, windows? insulae?
Il problema è questo: finché un sito è fatto di pagine statiche, o comunque non di contenuti generati dagli utenti, se ne mantiene una copia locale e una online, sincronizzate. Ma quando il sito ha contenuti creati dagli utenti, anche un semplice blog Wordpress, tenermi una copia locale sincronizzata con ciò che accade online è un grosso problema.
Ad esempio, se qualcuno riesce a creare un danno che si riflette nel database, che ne so, crea un bot che riempie di puttanate tipo XR un forum, o grazie a una vulnerabilità modifica direttamente degli script, un backup fedele replica gli errori in locale e viene a mancare lo scopo di un backupt che è recuperare.
Cioè già ad alto livello, prima ancora di stare a pensare a quale strumento o metodo affidarsi, mi appare un problema insolubile.-
Re: suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?Scritto da:
> Scritto da: dada216
> > Scritto da:
> > >
> > > Chissà se può risolvere l'annoso problema dei backup, che tanto mi spaventa.
> >
> > no, serve a tutt'altro.
> >
> > che cosa devi backuppare? linux, windows? insulae?
>
> Il problema è questo: finché un sito è fatto di pagine statiche, o comunque non di contenuti generati dagli utenti, se ne mantiene una copia locale e una online, sincronizzate. Ma quando il sito ha contenuti creati dagli utenti, anche un semplice blog Wordpress, tenermi una copia locale sincronizzata con ciò che accade online è un grosso problema.
>
> Ad esempio, se qualcuno riesce a creare un danno che si riflette nel database, che ne so, crea un bot che riempie di puttanate tipo XR un forum, o grazie a una vulnerabilità modifica direttamente degli script, un backup fedele replica gli errori in locale e viene a mancare lo scopo di un backupt che è recuperare.
>
> Cioè già ad alto livello, prima ancora di stare a pensare a quale strumento o metodo affidarsi, mi appare un problema insolubile.
a quanto ho capito io uno infatti non tiene un backup, ma molti backup, di momenti differenti nel tempo. Quando poi un database viene compromesso e modificato non puoi fare altro che tornare all'ultimo bakcup sano e perdere tutte le modifiche fatte tra la data in cui hai fatto l'ultimo backup sano e il momento in cui ti sei accorto che il databse era stato compromesso e danneggiato.
nel caso di wordpress non e' sufficiente fare un backup di tutti i file nella docroot del webserver e poi fare il backup del db?
sinceramente io non ho mai avuto bisogno di ripristinare un backup, non ho mai perso dei dati perche' si erano corrotti, pero' nel caso di webhosting il problema in effetti si pone, non ci avevo mai pensato in questi termini, e cmq non vedo il problema in realta', la soluzione e' rendere i backup abbastanza frequenti da ridurre la finestra di "possibile perdita" ad una dimensione accettabile.Please consider the environment before printing this message, 50% of the above is useless!-
Re: suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?Scritto daNon Autenticatoil 2017-07-03 00:49:21.0 alle 2017-07-03 00:49:21.0Scritto da: dada216
> Scritto da:
> > Scritto da: dada216
> > > Scritto da:
> > > >
> > > > Chissà se può risolvere l'annoso problema dei backup, che tanto mi spaventa.
> > >
> > > no, serve a tutt'altro.
> > >
> > > che cosa devi backuppare? linux, windows? insulae?
> >
> > Il problema è questo: finché un sito è fatto di pagine statiche, o comunque non di contenuti generati dagli utenti, se ne mantiene una copia locale e una online, sincronizzate. Ma quando il sito ha contenuti creati dagli utenti, anche un semplice blog Wordpress, tenermi una copia locale sincronizzata con ciò che accade online è un grosso problema.
> >
> > Ad esempio, se qualcuno riesce a creare un danno che si riflette nel database, che ne so, crea un bot che riempie di puttanate tipo XR un forum, o grazie a una vulnerabilità modifica direttamente degli script, un backup fedele replica gli errori in locale e viene a mancare lo scopo di un backupt che è recuperare.
> >
> > Cioè già ad alto livello, prima ancora di stare a pensare a quale strumento o metodo affidarsi, mi appare un problema insolubile.
>
> a quanto ho capito io uno infatti non tiene un backup, ma molti backup, di momenti differenti nel tempo. Quando poi un database viene compromesso e modificato non puoi fare altro che tornare all'ultimo bakcup sano e perdere tutte le modifiche fatte tra la data in cui hai fatto l'ultimo backup sano e il momento in cui ti sei accorto che il databse era stato compromesso e danneggiato.
Esatto, è questo che chiamo problema insolubile.
> nel caso di wordpress non e' sufficiente fare un backup di tutti i file nella docroot del webserver e poi fare il backup del db?
Giambo aveva però detto che quando cerchi di importare il database PHPadmin può rifiutarsi di farlo. Non ho però capito se puoi farlo in altri modi, esempio direttamente da MySQL.
> sinceramente io non ho mai avuto bisogno di ripristinare un backup, non ho mai perso dei dati perche' si erano corrotti, pero' nel caso di webhosting il problema in effetti si pone, non ci avevo mai pensato in questi termini, e cmq non vedo il problema in realta', la soluzione e' rendere i backup abbastanza frequenti da ridurre la finestra di "possibile perdita" ad una dimensione accettabile.
Quando Byethost mi ha cacciato mi hanno dato uno zip con il contenuto della mia home, ovviamente superfluo perché avevo già la mia copia locale, ma immagino che riprinstinare un sito complesso da uno zip sia già lavoro da cantinari.
-
Re: suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?Scritto daNon Autenticatoil 2017-07-03 09:37:27.0 alle 2017-07-03 09:37:27.0Scritto da: dada216
>
> sinceramente io non ho mai avuto bisogno di ripristinare un backup
questa la dice lunga, tutto quello che fai dura meno di un hard disk difettoso.
-
-
Re: suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?Scritto daNon Autenticatoil 2017-07-03 15:51:27.0 alle 2017-07-03 15:51:27.0Scritto da:
> Scritto da: dada216
> > Scritto da:
> > >
> > > Chissà se può risolvere l'annoso problema dei backup, che tanto mi spaventa.
> >
> > no, serve a tutt'altro.
> >
> > che cosa devi backuppare? linux, windows? insulae?
>
> Il problema è questo: finché un sito è fatto di pagine statiche, o comunque non di contenuti generati dagli utenti, se ne mantiene una copia locale e una online, sincronizzate. Ma quando il sito ha contenuti creati dagli utenti, anche un semplice blog Wordpress, tenermi una copia locale sincronizzata con ciò che accade online è un grosso problema.
>
> Ad esempio, se qualcuno riesce a creare un danno che si riflette nel database, che ne so, crea un bot che riempie di puttanate tipo XR un forum, o grazie a una vulnerabilità modifica direttamente degli script, un backup fedele replica gli errori in locale e viene a mancare lo scopo di un backupt che è recuperare.
>
> Cioè già ad alto livello, prima ancora di stare a pensare a quale strumento o metodo affidarsi, mi appare un problema insolubile.
oltre a salvare il db allo stato attuale, spesso conviene salvare tutte le query(che modificano il db)che sono state eseguite, così se qualcuno esegue query maligne puoi sistemare senza perdere dati-
Re: suora parlavi di distribuire patch e amministrare senza rompere il cazzzo?Scritto daNon Autenticatoil 2017-07-03 16:14:33.0 alle 2017-07-03 16:14:33.0Scritto da:
> Scritto da:
> > Scritto da: dada216
> > > Scritto da:
> > > >
> > > > Chissà se può risolvere l'annoso problema dei backup, che tanto mi spaventa.
> > >
> > > no, serve a tutt'altro.
> > >
> > > che cosa devi backuppare? linux, windows? insulae?
> >
> > Il problema è questo: finché un sito è fatto di pagine statiche, o comunque non di contenuti generati dagli utenti, se ne mantiene una copia locale e una online, sincronizzate. Ma quando il sito ha contenuti creati dagli utenti, anche un semplice blog Wordpress, tenermi una copia locale sincronizzata con ciò che accade online è un grosso problema.
> >
> > Ad esempio, se qualcuno riesce a creare un danno che si riflette nel database, che ne so, crea un bot che riempie di puttanate tipo XR un forum, o grazie a una vulnerabilità modifica direttamente degli script, un backup fedele replica gli errori in locale e viene a mancare lo scopo di un backupt che è recuperare.
> >
> > Cioè già ad alto livello, prima ancora di stare a pensare a quale strumento o metodo affidarsi, mi appare un problema insolubile.
>
> oltre a salvare il db allo stato attuale, spesso conviene salvare tutte le query(che modificano il db)che sono state eseguite, così se qualcuno esegue query maligne puoi sistemare senza perdere dati
È troppo complesso per me, devo trovare un modo per arricchire zappando
-
-
-
-
-