397 liens privés
Voici les options qui vous montrent les capacités de ce script python bien utile:
## OPTIONS
test_mode = True # Setting this to False will actually undertake the actions
verbose = True
delete_tweets = True # Do we want to delete tweets?
delete_favs = True # Do we want to delete favorites
max_favs = 4 # Don't delete a tweet if it has more than this number of favorites
max_rts = 4 # Don't delete a tweet if it has more than this number of retweets
days_to_keep = 2 # How many days tweets to keep?
# Enter IDs of tweets you want to preserve here
tweets_to_save = [
]
# Enter IDS of favorites you want to preserve here
favs_to_save = [
]
# Enter strings that if found, will result in the tweet not being deleted.
strings_to_save = [
"[nd]",
"New Blog Post:",
]
"""
(...)
Recently, Microsoft started using the pets versus cattle analogy, symbolizing the difference between how an administrator optimally treats a virtual machine image, and how she treats a container image. At DockerCon, advocates of a complete wave of change for the data center argued that administrators should learn to treat containers as ephemeral, that they should stop bestowing them with reverence and pet names, and instead see them as temporary delivery units for small quantities of functionality.
HashiCorp has a more contextual view of the ecosytem. For example, it may make sense to keep the database running, keeping it a pet, while the application itself might be abstracted into multiple services and be more ephemeral, like cattle.
“We believe that VMs and containers should be treated the same,” says Fishner. “The way we’ve built our tools, we are completely infrastructure- as well as technology-agnostic, in the way you get your application from development code to running in production.”
(...)
“We certainly agree with the transition from pets to cattle,” he says. “I think there’s going to be some things that, for the near future, aren’t realistic, like treating databases as cattle — that isn’t a problem that’s going to be solved any time in the near future. But treating stateless things as cattle is very well-adopted, so I think that we try to accommodate both.”
(...)
"""
Une approche hybride car ça n'a pas de sens de tout containeriser:
Traiter tout ce qui est stateless comme du bétail* (un serveur d'appli par ex) => containeriser, rendre ephémère
Traiter ce qui n'est pas stateless (une base de donnée par exemple) comme un animal de compagnie => VM ou bare-metal
Réalisable avec du Packer (création d'images ec2 (mais pas seulement)), Consul (service discovery/monitoring), Terraform (provisionning), Docker, Atlas (solution proprio de management packer/consul/terraform).
- Ooops, je vais m'attirer les foudres de certains shaarlistes >< Je ne fais que citer.
Faire de l'infra immutable sans docker.
On se force en plus à ne pas avoir ssh sur les instances pour se forcer à fonctionner avec des images (et réduire la surface d'attaque) : si on a besoin de faire une modif on trash l'instance et on switch sur une nouvelle qui est basée sur une autre version d'une image.
C'est bien joli mais pour fonctionner avec ces principes cela implique d'avoir un process bien bien carré pour faire ces images, comme la solution de l'auteur du billet en question.
Enfin pour débugguer, sans ssh c'est compliqué. Docker n'encourage pas non plus à mettre ssh dans les containers mais on peut l'avoir sur les machines qui les hébergent.
A creuser, concept néanmoins intéressant. Reste à trouver comment l'implémenter.