dimanche 7 avril 2024

RFC 1178. Choosing a Name for Your Computer (c ACM 1989)

 RFC 1178

Informational



Network Working Group                                          D. Libes

Request for Comments: 1178                Integrated Systems Group/NIST

FYI: 5                                                      August 1990



                   Choosing a Name for Your Computer


Status of this Memo


   This FYI RFC is a republication of a Communications of the ACM

   article on guidelines on what to do and what not to do when naming

   your computer [1].  This memo provides information for the Internet

   community.  It does not specify any standard.


   Distribution of this memo is unlimited.


Abstract


   In order to easily distinguish between multiple computers, we give

   them names.  Experience has taught us that it is as easy to choose

   bad names as it is to choose good ones.  This essay presents

   guidelines for deciding what makes a name good or bad.


   Keywords: domain name system, naming conventions, computer

   administration, computer network management


Introduction


   As soon as you deal with more than one computer, you need to

   distinguish between them.  For example, to tell your system

   administrator that your computer is busted, you might say, "Hey Ken.

   Goon is down!"


   Computers also have to be able to distinguish between themselves.

   Thus, when sending mail to a colleague at another computer, you might

   use the command "mail libes@goon".


   In both cases, "goon" refers to a particular computer.  How the name

   is actually dereferenced by a human or computer need not concern us

   here.  This essay is only concerned with choosing a "good" name.  (It

   is assumed that the reader has a basic understanding of the domain

   name system as described by [2].)


   By picking a "good" name for your computer, you can avoid a number of

   problems that people stumble over again and again.


   Here are some guidelines on what NOT to do.





Libes                                                           [Page 1]


RFC 1178                   Name Your Computer                August 1990



      Don't overload other terms already in common use.


         Using a word that has strong semantic implications in the

         current context will cause confusion.  This is especially true

         in conversation where punctuation is not obvious and grammar is

         often incorrect.


         For example, a distributed database had been built on top of

         several computers.  Each one had a different name.  One machine

         was named "up", as it was the only one that accepted updates.

         Conversations would sound like this: "Is up down?"  and "Boot

         the machine up." followed by "Which machine?"


         While it didn't take long to catch on and get used to this

         zaniness, it was annoying when occasionally your mind would

         stumble, and you would have to stop and think about each word

         in a sentence.  It is as if, all of a sudden, English has

         become a foreign language.


      Don't choose a name after a project unique to that machine.


         A manufacturing project had named a machine "shop" since it was

         going to be used to control a number of machines on a shop

         floor.  A while later, a new machine was acquired to help with

         some of the processing.  Needless to say, it couldn't be called

         "shop" as well.  Indeed, both machines ended up performing more

         specific tasks, allowing more precision in naming.  A year

         later, five new machines were installed and the original one

         was moved to an unrelated project.  It is simply impossible to

         choose generic names that remain appropriate for very long.


         Of course, they could have called the second one "shop2" and so

         on.  But then one is really only distinguishing machines by

         their number.  You might as well just call them "1", "2", and

         "3".  The only time this kind of naming scheme is appropriate

         is when you have a lot of machines and there are no reasons for

         any human to distinguish between them.  For example, a master

         computer might be controlling an array of one hundred

         computers.  In this case, it makes sense to refer to them with

         the array indices.


         While computers aren't quite analogous to people, their names

         are.  Nobody expects to learn much about a person by their

         name.  Just because a person is named "Don" doesn't mean he is

         the ruler of the world (despite what the "Choosing a Name for

         your Baby" books say).  In reality, names are just arbitrary

         tags.  You cannot tell what a person does for a living, what

         their hobbies are, and so on.




Libes                                                           [Page 2]


RFC 1178                   Name Your Computer                August 1990



      Don't use your own name.


         Even if a computer is sitting on your desktop, it is a mistake

         to name it after yourself.  This is another case of

         overloading, in which statements become ambiguous.  Does "give

         the disk drive to don" refer to a person or computer?


         Even using your initials (or some other moniker) is

         unsatisfactory.  What happens if I get a different machine

         after a year?  Someone else gets stuck with "don" and I end up

         living with "jim".  The machines can be renamed, but that is

         excess work and besides, a program that used a special

         peripheral or database on "don" would start failing when it

         wasn't found on the "new don".


         It is especially tempting to name your first computer after

         yourself, but think about it.  Do you name any of your other

         possessions after yourself?  No.  Your dog has its own name, as

         do your children.  If you are one of those who feel so inclined

         to name your car and other objects, you certainly don't reuse

         your own name.  Otherwise you would have a great deal of

         trouble distinguishing between them in speech.


         For the same reason, it follows that naming your computer the

         same thing as your car or another possession is a mistake.


      Don't use long names.


         This is hard to quantify, but experience has shown that names

         longer than eight characters simply annoy people.


         Most systems will allow prespecified abbreviations, but why not

         choose a name that you don't have to abbreviate to begin with?

         This removes any chance of confusion.


      Avoid alternate spellings.


         Once we called a machine "czek".  In discussion, people

         continually thought we were talking about a machine called

         "check".  Indeed, "czek" isn't even a word (although "Czech"

         is).


         Purposely incorrect (but cute) spellings also tend to annoy a

         large subset of people.  Also, people who have learned English

         as a second language often question their own knowledge upon

         seeing a word that they know but spelled differently.  ("I

         guess I've always been spelling "funxion" incorrectly.  How

         embarrassing!")




Libes                                                           [Page 3]


RFC 1178                   Name Your Computer                August 1990



         By now you may be saying to yourself, "This is all very

         silly...people who have to know how to spell a name will learn

         it and that's that." While it is true that some people will

         learn the spelling, it will eventually cause problems

         somewhere.


         For example, one day a machine named "pythagoris" (sic) went

         awry and began sending a tremendous number of messages to the

         site administrator's computer.  The administrator, who wasn't a

         very good speller to begin with, had never seen this machine

         before (someone else had set it up and named it), but he had to

         deal with it since it was clogging up the network as well as

         bogging down his own machine which was logging all the errors.

         Needless to say, he had to look it up every time he needed to

         spell "pythagoris".  (He suspected there was an abbreviation,

         but he would have had to log into yet another computer (the

         local nameserver) to find out and the network was too jammed to

         waste time doing that.)


      Avoid domain names.


         For technical reasons, domain names should be avoided.  In

         particular, name resolution of non-absolute hostnames is

         problematic.  Resolvers will check names against domains before

         checking them against hostnames.  But we have seen instances of

         mailers that refuse to treat single token names as domains.

         For example, assume that you mail to "libes@rutgers" from

         yale.edu.  Depending upon the implementation, the mail may go

         to rutgers.edu or rutgers.yale.edu (assuming both exist).


      Avoid domain-like names.


         Domain names are either organizational (e.g., cia.gov) or

         geographical (e.g., dallas.tx.us).  Using anything like these

         tends to imply some connection.  For example, the name "tahiti"

         sounds like it means you are located there.  This is confusing

         if it is really somewhere else (e.g., "tahiti.cia.gov is

         located in Langley, Virginia?  I thought it was the CIA's

         Tahiti office!").  If it really is located there, the name

         implies that it is the only computer there.  If this isn't

         wrong now, it inevitably will be.


         There are some organizational and geographical names that work

         fine.  These are exactly the ones that do not function well as

         domain names.  For example, amorphous names such as rivers,

         mythological places and other impossibilities are very

         suitable.  ("earth" is not yet a domain name.)





Libes                                                           [Page 4]


RFC 1178                   Name Your Computer                August 1990



      Don't use antagonistic or otherwise embarrassing names.


         Words like "moron" or "twit" are good names if no one else is

         going to see them.  But if you ever give someone a demo on your

         machine, you may find that they are distracted by seeing a

         nasty word on your screen.  (Maybe their spouse called them

         that this morning.)  Why bother taking the chance that they

         will be turned off by something completely irrelevant to your

         demo.


      Don't use digits at the beginning of the name.


         Many programs accept a numerical internet address as well as a

         name.  Unfortunately, some programs do not correctly

         distinguish between the two and may be fooled, for example, by

         a string beginning with a decimal digit.


         Names consisting entirely of hexadecimal digits, such as

         "beef", are also problematic, since they can be interpreted

         entirely as hexadecimal numbers as well as alphabetic strings.


      Don't use non-alphanumeric characters in a name.


         Your own computer may handle punctuation or control characters

         in a name, but most others do not.  If you ever expect to

         connect your computer to a heterogeneous network, you can count

         on a variety of interpretations of non-alphanumeric characters

         in names.  Network conventions on this are surprisingly

         nonstandard.


      Don't expect case to be preserved.


         Upper and lowercase characters look the same to a great deal of

         internet software, often under the assumption that it is doing

         you a favor.  It may seem appropriate to capitalize a name the

         same way you might do it in English, but convention dictates

         that computer names appear all lowercase.  (And it saves

         holding down the shift key.)


   Now that we've heard what not to do, here are some suggestions on

   names that work well.


      Use words/names that are rarely used.


         While a word like "typical" or "up" (see above) isn't computer

         jargon, it is just too likely to arise in discussion and throw

         off one's concentration while determining the correct referent.

         Instead, use words like "lurch" or "squire" which are unlikely




Libes                                                           [Page 5]


RFC 1178                   Name Your Computer                August 1990



         to cause any confusion.


         You might feel it is safe to use the name "jose" just because

         no one is named that in your group, but you will have a problem

         if you should happen to hire Jose.  A name like "sphinx" will

         be less likely to conflict with new hires.


      Use theme names.


         Naming groups of machines in a common way is very popular, and

         enhances communality while displaying depth of knowledge as

         well as imagination.  A simple example is to use colors, such

         as "red" and "blue".  Personality can be injected by choices

         such as "aqua" and "crimson".


         Certain sets are finite, such as the seven dwarfs.  When you

         order your first seven computers, keep in mind that you will

         probably get more next year.  Colors will never run out.


         Some more suggestions are: mythical places (e.g., Midgard,

         Styx, Paradise), mythical people (e.g., Procne, Tereus, Zeus),

         killers (e.g., Cain, Burr, Boleyn), babies (e.g., colt, puppy,

         tadpole, elver), collectives (e.g., passel, plague, bevy,

         covey), elements (e.g., helium, argon, zinc), flowers (e.g.,

         tulip, peony, lilac, arbutus).  Get the idea?


      Use real words.


         Random strings are inappropriate for the same reason that they

         are so useful for passwords.  They are hard to remember.  Use

         real words.


      Don't worry about reusing someone else's hostname.


         Extremely well-known hostnames such as "sri-nic" and "uunet"

         should be avoided since they are understood in conversation as

         absolute addresses even without a domain.  In all other cases,

         the local domain is assumed to qualify single-part hostnames.

         This is similar to the way phone numbers are qualified by an

         area code when dialed from another area.


         In other words, if you have choosen a reasonable name, you do

         not have to worry that it has already been used in another

         domain.  The number of hosts in a bottom-level domain is small,

         so it shouldn't be hard to pick a name unique only to that

         domain.






Libes                                                           [Page 6]


RFC 1178                   Name Your Computer                August 1990



      There is always room for an exception.


         I don't think any explanation is needed here.  However, let me

         add that if you later decide to change a name (to something

         sensible like you should have chosen in the first place), you

         are going to be amazed at the amount of pain awaiting you.  No

         matter how easy the manuals suggest it is to change a name, you

         will find that lots of obscure software has rapidly accumulated

         which refers to that computer using that now-ugly name.  It all

         has to be found and changed.  People mailing to you from other

         sites have to be told.  And you will have to remember that

         names on old backup media labels correspond to different names.


         I could go on but it would be easier just to forget this

         guideline exists.


Conclusion


   Most people don't have the opportunity to name more than one or two

   computers, while site administrators name large numbers of them.  By

   choosing a name wisely, both user and administrator will have an

   easier time of remembering, discussing and typing the names of their

   computers.


   I have tried to formalize useful guidelines for naming computers,

   along with plenty of examples to make my points obvious.  Having been

   both a user and site administrator, many of these anecdotes come from

   real experiences which I have no desire to relive.  Hopefully, you

   will avoid all of the pitfalls I have discussed by choosing your

   computer's name wisely.


Credits


   Thanks to the following people for suggesting some of these

   guidelines and participating in numerous discussions on computer

   naming: Ed Barkmeyer, Peter Brown, Chuck Hedrick, Ken Manheimer, and

   Scott Paisley.


   This essay first appeared in the Communications of the ACM, November,

   1989, along with a Gary Larson cartoon reprinted with permission of

   United Press Syndicate.  The text is not subject to copyright, since

   it is work of the National Institute of Standards and Technology.

   However, the author, CACM, and NIST request that this credit appear

   with the article whenever it is reprinted.








Libes                                                           [Page 7]


RFC 1178                   Name Your Computer                August 1990



References


   [1]  Libes, D., "Choosing a Name for Your Computer", Communications

   of the ACM, Vol. 32, No. 11, Pg. 1289, November 1989.


   [2]  Mockapetris, P., "Domain Names - Concepts and Facilities",

   RFC 1034, USC/Information Sciences Institute, November 1987.


Security Considerations


   Security issues are not discussed in this memo.


Author's Address


   Don Libes

   Integrated Systems Group

   National Institute of Standards and Technology

   Gaithersburg, MD 20899


   Phone: (301) 975-3535


   EMail:  libes@cme.nist.gov






























Libes                                                           [Page 8]

RFC 1178

Informational





Document type

RFC Informational

August 1990

Select version

RFC 1178

Author

Don Libes

RFC stream

Legacy stream

Other formats

   


mardi 26 mars 2024

terminology: VUCA

 VUCA environments = volatile, uncertain, complex and ambiguous (VUCA)

CI/CD and secure supply chain

https://www.sigstore.dev/ ( & cosig https://github.com/sigstore/cosign )

https://in-toto.io/

(cf. red hat trusted software supply chain which actually embeds those open source tools)



+ backstage.io for "platform engineering"

jeudi 29 février 2024

git pre-commit hooks library

cf.  https://codimd.nomadic-labs.com/p/YcXmjg1qv#/4


pre-commit is a tool that helps to configure git pre-commit hooks, with an abundance of already configured scripts


pre-commit install and configuration

  • Install in system

(apt-get / brew ) install pre-commit


  • install in repo 
then in each repo clone (set-up pre-commit for this repo):

pre-commit install


  • then (configure) edit .pre-commit-config.yaml


.pre-commit-config.yaml example  (from https://gitlab.com/tezos/tezos/-/blob/master/.pre-commit-config.yaml?ref_type=heads )

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.2.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
  - repo: https://github.com/koalaman/shellcheck-precommit
    rev: v0.9.0
    hooks:
      - id: shellcheck
        args: [ "--external-sources" ]
  - repo: https://github.com/cisagov/pre-commit-shfmt
    rev: v0.0.2
    hooks:
      - id: shfmt
        # These settings must mirror the ones set in `scripts/lint.sh`.
        args: [ "-i", "2", "-sr", "-d" ]
  - repo: https://github.com/arenadotio/pre-commit-ocamlformat
    rev: 0439858
    hooks:
      - id: ocamlformat
        args: [ "-i" ]
  - repo: https://github.com/hadolint/hadolint
    rev: v2.9.3
    hooks:
      - id: hadolint-docker
  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.28.0
    hooks:
      - id: check-gitlab-ci
        args: ["--verbose"]
        files: '(\.gitlab-ci\.yml|\.gitlab/ci/.*\.yml)'



General Notes about pre-commits


  • runs only against staged files

 

  • to run manually :

pre-commit run --all-files


  • to run 1 check specifically  (example : run only  1 plugin (shfmt) )

pre-commit run shfmt





mardi 20 février 2024

[video] Situation Normal, everything must change

 https://www.youtube.com/watch?v=BnqyOYvKt9w




https://spaconference.org/spa2016/simon-wardley.html


[video] So You Think You Know Git - FOSDEM 2024

 Scott Chacon's FOSDEM 2024 talk on Git Tips and Tricks.



https://www.youtube.com/watch?v=aolI_Rz0ZqY&t=4s



Scott talks about:


00:00 - Introduction

01:06 - About Me (well, Scott Chacon)

02:36 - How Well Do You Know Git?

05:09 - Our Agenda

06:25 - Some Helpful Config Stuff

09:42 - Oldies But Goodies

16:22 - Some New Stuff (You May Not Have Noticed)

23:48 - Some Big Repo Stuff / Monorepo Stuff

33:29 - Some New Github Stuff

35:54 - GitButler


36:50 - End of talk

37:03 - Start of Q&A Session

37:06 - Q: Why does GitHub not do git range diff?

38:28 - Q: Why do submodules suck everywhere?

40:16 - Q: With SSH signing, is it possible to specify more than one key?

40:42 - Q: Why can't --force-with-lease be the default force?

42:33 - Q: If you were back on the Git development team, what direction would you like to see it move in?

44:58 - Q: We all love the Git CLI - but do you ever use any visual tools?

46:41 - That's all folks!-

terraform variable <-> variables {script, gitlab-ci}

 (Ici, ce que vous voulez avant le lien) (Ici vous racontez votre vie)


terraform -> gitlab/script/etc.


src: https://stackoverflow.com/questions/75531444/how-to-use-terraform-variable-into-gitlab-ci-yml

  • Terraform : use an "output" 

locals {
toto = format ("${var.ressource_name_pattern}-something", "cloudfront-edge")
}

output "toto" {
 value = local.toto
}

  • Script: get output from terraform command

foobar = ${terraform output toto}



gitlab -> Terraform


Read environment variables in terraform variables, add TF_VAR_ in front of the variable name,

=> env / exported  "TF_VAR_toto" => variable.tf variable toto





terraform -> gitlab/script/etc. VARIABLE (in project settings)

src https://www.reddit.com/r/Terraform/comments/mwmq4e/comment/gvjo7g3/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

     For example : create an EKS cluster & then create a variable with the KUBECONFIG data in another project which has the code for the apps & trigger the deployment of those apps into newly created cluster using that variable.

    - terragrunt run-all apply --terragrunt-non-interactive -auto-approve tfplan-$CI_COMMIT_SHA
    - terraform output kubectl_config > kubectl_config
    - |
      curl -s -XPUT -H "PRIVATE-TOKEN: $GITLAB_API_RW_PRIVATE_TOKEN" $CI_API_V4_URL/groups/$GROUP_ID/variables/KUBECONFIG \
      --form "value=$(cat kubectl_config)" \
      --form "variable_type=file" \
      --form "protected=false" \
      --form "masked=false" \ 
      --form "environment_scope=*" 






jeudi 25 janvier 2024

Québec pépinières






Domaine Joly de Lotbinière (Sainte-Croix de Lotbinière)
http://www.domainejoly.com/fr/accueil/

Fédération des sociétés d’horticulture et d’écologie du Québec
http://www.fsheq.com/

Le potager ornemental de Catherine (semences de fleurs et de légumes à pollinisation libre sans engrais ni pesticide à Saint-Apollinaire)
http://www.potagerornemental.com/

La municipalité de Saint-Antoine-de-Tilly
http://www.saintantoinedetilly.com/

La municipalité de Saint-Apollinaire
http://st-apollinaire.com

Tourisme Lotbinière
http://lotbiniere.chaudiereappalaches.com/fr/accueil/


ASSOCIATIONS ET SOCIÉTÉS HORTICOLES AU QUÉBEC ET AU CANADA

Association des amateurs d’hémérocalles de la région de Québec
http://www.aahrq.com/AAHRQ/Accueil.html

Association des petits jardins du Québec
http://www.petitsjardins.com/

Fédération des sociétés d’horticulture et d’écologie du Québec
(Ce site web donne accès à toutes les sociétés membres)
http://www.fsheq.com/

Réseau d’agriculture urbaine de Québec
http://www.agricultureurbaine.net/

Société canadienne de la pivoine
http://www.peony.ca/f_html/acceuil.htm

Société des hémérocalles du Canada
http://www.distinctly.on.ca/chs/

Société des roses du Québec
http://www.rosesquebec.org/

Société québécoise du dahlia
http://www.sqdahlia.qc.ca/


DOCUMENTATION

Guide du potager urbain (Livre pdf à télécharger gratuitement)

http://www.guidepotagerurbain.com/

Botanix (trucs simples)
http://www.botanix.com/client/pagesoussection.asp?clef2=5

Jardinage.net C’est le temps de… (conseils, annuaire du jardiner, forum, etc.)
http://www.jardinage.net/

Écohabitation : les meilleures ressources sur le web
http://www.ecohabitation.com/actualite/nouvelles/potager-urbain-quebec-2-meilleures-ressources-web

Espace pour la vie. Carnet horticole et botanique (tous les sujets en horticulture)
http://espacepourlavie.ca/carnet-horticole-et-botanique

Photos de plantes et de jardins en ligne
http://www.millettephotosdeplantes.com/

Urbainculteurs (fiches conseils sur les légumes et le jardinage)
http://urbainculteurs.org/conseils-2


SEMENCES D’ICI ET SEMENCES RARES

Garden North (plantes rares, rustiques)
http://www.gardensnorth.com/site/

Indigo (semences et plantes indigènes)
http://www.horticulture-indigo.com/index.php

Jardins de l’écoumène (semences biologiques du patrimoine)
http://www.ecoumene.com/

La Société des plantes (variétés certifiées biologiques)
http://www.lasocietedesplantes.com/?p=p_3

Le potager ornemental de Catherine (semences de fleurs et de légumes à pollinisation libre sans engrais ni pesticide à Saint-Apollinaire)
http://www.potagerornemental.com/

Les jardins de Nathalie (semences de légumes anciens, fleurs et tubercules de culture biologique, variétés rares)
www.semences-jardinsnathalie.com

Les Jardins du Grand Portage (semences à pollinisation libre sans engrais, sans pesticide)
http://www.jardinsdugrandportage.com/semences.html?2013

Mycoflor Plantes et champignons pour l’amateur d’ethnobotanique (semences non traitées de variétés anciennes et non hybrides de plantes annuelles et vivaces)
http://www.mycoflor.ca/

Raresexoticseeds (semences rares er exotiques)
http://www.rarexoticseeds.com/fr/

Semences du patrimoine (réseau d’échange et de préservation des semences à pollinisation libre)
http://www.semences.ca/fr.php

Semences Solana (200 variétés de tomates, fleurs, légumes)
http://solanaseeds.netfirms.com/accueil.html


PÉPINIÈRES AU QUÉBEC

Arbres en ligne.com (arbres et arbustes indigènes et naturalisés)
http://www.arbresenligne.com/

Ferme les champs fleuris (lys et iris)
http://www.champsfleuris.com/

Fleurs de l’Ile (fleurs annuelles)
http://www.lesfleursdelile.com/produits.html

FloreSSences (plantes indigènes et naturalisées)
http://www.floressens.ca/index.html

Iris d’eau (plantes aquatiques)
http://www.irisdeau.com/accueil

Le jardin des curiosités (différentes variétés de vivaces, arbustes, etc.)
http://www.lejardindescuriosites.com/pepiniere.html

Les jardins Osiris (différentes variétés de vivaces)
http://www.lesjardinsosiris.com/index_fr.htm

Les vivaces du merle bleu (différentes variétés de vivaces)
http://vivacesmerlebleu.com/

Pépinière fruitière rustique et ancestrale
http://www.pepinieriste.ca/

Pépinière Select plus internationale (lilas)
http://www.spi.8m.com/

Pivoines Capano
http://www.pivoinescapano.com/

Pivoinerie D’Aoust
http://paeonia.com/

Plantek biotechnologies (pivoines Itoh)
http://www.planteck.com/ben/fr/

Vivaces de l’Isle (vivaces, hémérocalles)
http://www.vivaces.net/


GRANDS JARDINS À VISITER AU QUÉBEC

Jardin botanique Van den Hende (Ste-Foy)
http://www.jardin.ulaval.ca/

Jardin botanique de Montréal (Montréal)
http://espacepourlavie.ca/jardin-botanique

Jardin Daniel A. Séguin (Saint-Hyacinthe)
http://www.itasth.qc.ca/jardindas/index.html

Jardins de Doris (Matane)
http://www.jardinsdedoris.ca/

Jardins de Métis (Grand Métis)
http://www.JardinsDeMetis.com/francais/index.php

Parc Marie-Victorin (Kinsey Falls)
http://www.parcmarievictorin.com/

Maison Saint-Gabriel (Montréal)
http://www.maisonsaint-gabriel.qc.ca/


OUTILS ET ACCESSOIRES

GARDENA (catalogues des différents outils de la compagnie)
http://www.gardena.com/ca/fr/

Gérard Bourbeau et fils (centre horticole)
http://www.gerardbourbeau.com/magasin/bienvenue.htm

Lee Valley (Catalogue qui contient de tout !)
http://www.leevalley.com/fr/home.aspx?c=

Urbainculteurs (smart pots)
http://urbainculteurs.org/materiel


RENSEIGNEMENTS PRATIQUE

Calendrier de semis des légumes (Région de Montréal)
http://m.espacepourlavie.ca/calendrier-de-semis-de-legumes

mercredi 17 janvier 2024

Conventional Commits specification

 https://www.conventionalcommits.org/en/v1.0.0/

The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.



for example, to be used with commitlint : 

https://github.com/conventional-changelog/commitlint 



example, on gitlab-ci : https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/merge_requests/85#587d266bb27a4dc3022bbed44dfa19849df3044c


or, at changelog level :

https://github.com/conventional-changelog/conventional-changelog


also cf. commitzen  :

https://github.com/commitizen/cz-cli

lundi 15 janvier 2024

terraform, then ansible

Terraform creates the infra, 
then we want to use ansible to actually configure it...

Different solutions exist to run Terraform, and them ansible:

  • Using Terraform Output as Ansible Inventory :
    https://github.com/adammck/terraform-inventory
     $ terraform-inventory -inventory terraform.tfstate [all] 10.10.1.2 10.10.1.3


  • `local-exec` / `remote-exec` : terraform runs ansible locally 

     ``` provisioner "local-exec" {command = "ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u {var.user} -i '${self.ipv4_address},' --private-key ${var.ssh_private_key} playbook.yml"} ```
    key component here is the ${self.ipv4_address} variable. After provisioning the machine, Terraform knows its IP address. And we need to pass an IP address for Ansible.

     (cf https://www.cprime.com/resources/blog/terraform-and-ansible-tutorial-integrating-terraform-managed-instances-with-ansible-control-nodes )

     

  • using dynamic inventory and cloud providers specific ansible modules 

    •  AWS : https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html 
    •  GCP : https://docs.ansible.com/ansible/latest/collections/google/cloud/gcp_compute_inventory.html#ansible-collections-google-cloud-gcp-compute-inventory and so on...



AWS example of the dynamic inventory:


ansible.cfg :
enable_plugins=aws_ec2

aws_ec2.yml (example):
plugin: aws_ec2
regions:
  - "us-east-1"
keyed_groups:
  - key: tags.Name
  - key: tags
    prefix: tag
  - prefix: instance_type
    key: instance_type
  - key: placement.region
    prefix: aws_region
filters:
  instance-state-name : running
  # All instances with their `Environment` tag set to `dev`
  tag:Environment: dev
  # All dev and QA hosts
  tag:Environment:
    - dev
    - qa
compose:
  ansible_host: public_ip_address



Good way to test : 
ansible-inventory -i aws_ec2.yml --graph
ansible all –list-hosts



To run a playbook have/generate 4 files : myplaybook.yml, key.pem, aws_ec2.yml (seen before), and ansible.cfg (seen after)


ansible.cfg
[defaults]
inventory=./aws_ec2.yml
host_key_chekcing=false
remote_user=ec2-user
private_key_file=key.pem

[privilege_escalation]
become=true
become_method=sudo
become_user=root


Run 

ansible <group-name> -i aws_ec2.yaml -m ping --private-key=<private-key-name> 

ansible-playbook myplaybook.yml
 (with hosts: _Ansible_TargetNode or whatever you have validated in the output of the inventory)






# sources : 
https://www.cloudthat.com/resources/blog/step-by-step-guide-to-integrate-ansible-dynamic-inventory-plugin-for-aws-ec2-instances#why-ansible-dynamic-inventory-

https://medium.com/geekculture/a-complete-overview-of-ansible-dynamic-inventory-a9ded104df4c