16:01:25 #startmeeting Infrastructure (2022-05-12) 16:01:26 Meeting started Thu May 12 16:01:25 2022 UTC. 16:01:26 This meeting is logged and archived in a public location. 16:01:26 The chair is mkonecny. Information about MeetBot at https://fedoraproject.org/wiki/Zodbot#Meeting_Functions. 16:01:26 Useful Commands: #action #agreed #halp #info #idea #link #topic. 16:01:26 The meeting name has been set to 'infrastructure_(2022-05-12)' 16:01:26 #meetingname infrastructure 16:01:26 The meeting name has been set to 'infrastructure' 16:01:26 #chair nirik siddharthvipul mobrien zlopez bodanel dtometzki jnsamyak computerkid 16:01:26 #info Agenda is at: https://board.net/p/fedora-infra 16:01:26 #info About our team: https://docs.fedoraproject.org/en-US/cpe/ 16:01:26 Current chairs: bodanel computerkid dtometzki jnsamyak mkonecny mobrien nirik siddharthvipul zlopez 16:01:26 #info Fedora Infra documentation: https://docs.fedoraproject.org/en-US/infra 16:01:27 #topic greetings! 16:01:27 Hi everyone 16:01:32 .hi 16:01:32 morning everyone. 16:01:33 mobrien: mobrien 'Mark O'Brien' 16:01:35 .hello zlopez 16:01:37 mkonecny: zlopez 'Michal Konecny' 16:01:39 .hello bittin 16:01:40 bittin: bittin 'Luna Jernberg' 16:02:20 .hi 16:02:21 darknao: darknao 'Francois Andrieu' 16:03:30 It seems that we have plenty of people here today :-) 16:03:41 Let's see if there is anyone new 16:03:45 #topic New folks introductions 16:03:45 #info This is a place where people who are interested in Fedora Infrastructure can introduce themselves 16:03:45 #info Getting Started Guide: https://fedoraproject.org/wiki/Infrastructure/GettingStarted 16:04:05 Fedora 36 is new... :) 16:04:08 Don't be shy :-) 16:04:26 Welcome Fedora 36 :-D 16:04:31 guess i am pretty new, don't really attend the Infra meetings that much but had some spare time 16:04:48 welcome bittin! 16:04:52 also yay F36, first updates for F36 just dropped and release party online from tommorow: https://hopin.com/events/fedora-linux-36-release-party 16:05:29 welcome bittin 16:05:33 welcome bittin 16:06:08 It doesn't seem we have anybody else, who is new here 16:06:16 So let's go to the next item on our list 16:06:31 #topic Next chair 16:06:31 #info magic eight ball says: 16:06:34 #info chair 2022-05-12 - zlopez 16:06:34 #info chair 2022-05-19 - nirik 16:06:34 #info chair 2022-05-26 - ? 16:06:52 Anybody wants to chair 2022-05-26? 16:07:42 I can do that day 16:08:22 Sold! 16:08:32 #info chair 2022-05-26 - mobrien 16:08:56 And now let's see what is there to announce 16:09:00 .hi 16:09:01 eddiejennings: eddiejennings 'Eddie Jennings' 16:09:03 #topic announcements and information 16:09:03 #info CPE Infra&Releng EU-hours team has a Monday through Thursday 30 minute meeting going through tickets at 1030 Europe/paris in #centos-meeting 16:09:03 #info CPE Infra&Releng NA-hours team has a Monday through Thursday 30 minute meeting going through tickets at 1800 UTC in #fedora-meeting-3 16:09:09 #info If your team wants support from the Fedora Program Management Team, file an isssue: https://pagure.io/fedora-pgm/pgm_team/issues?template=support_request 16:09:09 #info thread on fedoraplanet on infrastructure list, chime in if you have thoughts on it 16:09:09 #info please help us with improving contribution to fedora infra 16:09:19 https://discussion.fedoraproject.org/t/improving-contribution-to-fedora-infrastructure/38294/8 16:09:19 #info oncall should also handling #fedora-releng pings if possible 16:09:19 #info Fedora 36 released! get it now! https://getfedora.org/ 16:09:54 I have a semi announcement 16:10:10 I have a potential announcement, but needs a bit of discussion first. ;) 16:10:23 Where possible try to use the oncall rather than pinging people directly 16:10:46 Also you can ask on the standups 16:11:01 +1 16:12:02 We encourage anyone to join our standups and ask questions 16:12:57 You can even talk to us on jitsi on Monday and Thursday EU meeting :-) 16:14:12 Any other announcement? 16:14:29 so, I was thinking we should perhaps do a mass update/reboot next week... 16:14:36 mobrien: what do you think? next wed? 16:14:49 since rhel8.6 came out... 16:15:13 nirik: It's already in our plan :-) 16:15:18 Yep 16:15:24 I'm game 16:15:34 so the infra is running rhel and not fedora?, just curious 16:15:48 bittin: We use both 16:16:06 i see so F36 and rhel 8.6 mass updates 16:16:07 yeah, depends on the need... 16:16:17 we do have many more fedora instances than rhel 16:16:30 ah i see. was just curious 16:16:35 also, I need to generate a list of Fedora-34 things... so we can move them up. 16:17:27 We wouldn't automatically move everything up to F36 as there maybe some legacy dependancies on some servers 16:18:05 But we try to keep as up to date as we can 16:18:56 Let's continue with oncall 16:18:57 #topic Oncall 16:18:57 #info https://fedoraproject.org/wiki/Infrastructure/Oncall 16:18:57 #info https://docs.fedoraproject.org/en-US/cpe/day_to_day_fedora/ 16:18:57 ## .oncalltakeeu .oncalltakeus 16:19:03 #info mobrien on call from 2022-05-06 to 2022-05-12 16:19:03 #info mkonecny on call from 2022-05-13 to 2022-05-19 16:19:03 #info ??? on call from 2022-05-20 to 2022-05-26 16:19:23 Here's the distribution for anyone who cares: 285 35... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/f2970d4a55b492adfb9598edad350eea81d940b7) 16:19:27 So we still have free oncall slot for taking from 2022-05-20 to 2022-05-26 16:19:27 I can be on-call for 2022-05-20 16:19:51 Who wants to take it? 16:19:57 nirik[m], neat thx 16:20:05 mkonecny, I'll take it 16:21:07 and I can take the next slot 16:21:18 I think we have a small turnout today so short on volunteers 16:21:33 ha! I am wrong 16:21:44 I will give it to you 16:22:01 #info eddiejennings on call from 2022-05-20 to 2022-05-26 16:22:19 :D 16:22:28 #info darknao on call from 2022-05-27 to 2022-06-02 16:23:30 Ok, we are pretty ready for the oncall in following weeks 16:23:40 .oncalltakeeu 16:23:40 mkonecny: Kneel before zod! 16:23:53 #info Summary of last week: (from current oncall ) 16:24:13 mobrien: Any ping? 16:24:34 I actually took this late as I wasn't here for the meeting last week and didn't realise, sorry nirik 16:24:38 I had 2 pings 16:24:53 One was zodbot acting up so I restarted it. 16:25:12 The other was a wiki issue that I asked them to take a ticket about 16:25:28 s/take/create 16:26:38 Ok, thanks mobrien 16:26:44 #topic Monitoring discussion [nirik] 16:26:44 #info https://nagios.fedoraproject.org/nagios 16:26:44 #info Go over existing out items and fix 16:27:24 so, nothing really changed here 16:27:43 we continue to get badges and resultsdb alerts anoyingly 16:27:56 I will do that ocp cert tomorrow now that freeze is over 16:28:22 was just about to mention that one. ;) 16:28:43 also, in other news... I got that zabbix staging instance we setup a long time ago working. 16:28:44 🙂 16:28:51 It's currently only monitoring... itself... 16:28:52 Nice one! 16:29:09 but I thought I would add the client to all stg and see what it looks like... 16:29:20 everything healthy I hope 16:30:00 yeah, I also need to look at the centos configs for any ideas. 16:30:05 Is it local users for auth? 16:30:32 oddly, the gssapi/kerberos auth I was trying to get working the other day, now works. 16:30:42 You have to create a local user, but then you can auth via kerberos. 16:31:55 ah ok 16:33:01 thats all on monitoring for now I think. 16:33:41 Thanks nirik 16:33:57 And we have a learning topic for today 16:34:02 #topic Learning topic 16:34:03 #info Intro to AWS and Terraform [mobrien] 2022-05-12 16:34:36 I actually forgot I was doing this till this morning so its a bit rough and ready but here goes 16:34:46 Terraform is a tool made by hashicorp. It is primarily used to deploy Infrastructure as code. 16:34:54 One of the key benefits of Terraform over something like AWS Cloudformation is that it is vendor agnostic. 16:35:11 This means you can deploy to multiple different cloud providers using terraform code. 16:35:17 Terraform is written declaritively which means that you just provide what infrastructure you want and don't have to worry about how the api works to create it. 16:35:56 Terraform uses HCL (Hashicorp Configuration Language) although json can be used. All the docs which are quite good are in HCL 16:36:29 Documentation can be found here https://www.terraform.io/language/syntax/configuration 16:37:00 Generally it based on blocks and argument definitions which I will show as we go. 16:37:12 There is a ton of examples here for aws: https://github.com/hashicorp/terraform-provider-aws/tree/main/examples 16:37:20 They also provide examples for other providers too which can be found on github. 16:37:50 It uses "providers" to define your target, these are plugins which you define depending on where or what you would like to build. 16:38:01 Aws or Azure for example are providers. A list of which you can see here: 16:38:13 https://registry.terraform.io/browse/providers 16:38:29 You will need to define a provider for terraform to understand your code. 16:38:39 An example of defining a provider: 16:38:52 provider "aws" {region = "us-east-1"} 16:39:01 I will be flattening any of the code block examples I use for ease of reading on irc 16:39:21 Generaaly that would be written something like : 16:39:31 provider "aws" { 16:39:44 region = "us-east-1" 16:39:47 } 16:40:55 The HCL language doesn't use "," to separate objects so newlines are important 16:41:07 These are a little awkward to show on irc however 16:41:29 Anyway I digress... 16:41:46 Resource blocks are the back bone of Terraform, they are somewhat like modules in Ansible 16:42:05 They are defined for each object and take variables needed to define the object. 16:42:18 For example creating a vpc in AWS is as simple as 16:42:28 resource "aws_vpc" "vpc_name" { cidr_block = "10.0.0.0/16" } 16:42:53 "resource" is a key word in terraform to say what you are defining, much like provider in the example above 16:43:11 "aws_vpc" is the resource type. These are defined by the provider plugin and specify the type of resource you wish to deploy. 16:43:24 Inside the braces is where the required vars are defined. 16:43:48 Variables are also defined in blocks (the clunkiest part of Terraform in my opinion) 16:43:59 It does however let you more tightly type the variable. An example: 16:44:03 variable "image_id" { type = string } 16:44:19 In this case "image_id" is the variable name. It is not required to pass any parameters to a variable. 16:44:32 Variables can then be used with the var keyword e.g. "var.image_id" would use the variable above. 16:45:16 I will pause there for a minute to give people a chance to read the wall of text and ask any questions on what I have so far before I go on 16:46:41 so, I have one: 16:47:06 where does one 'run' this? do you install run terraform on your local machine? or do you upload the scripts and it runs in the cloud side? 16:47:09 go for it 16:47:29 You install and run locally 16:48:06 You could set up something like what we have in the batcave for team use 16:48:09 ok, cool. 16:48:25 so it has some config to know how to talk to your provider? 16:48:29 It is important to keep track of the state of the infra but I will get to that later 16:49:25 So when you write the code you set a provider in the code and then before you run it it will install the required plugins to talk to that provider 16:49:48 * nirik nods 16:50:25 So terraform has a base package and then relies on "providers" which are plugins. They support a lot themselves and there are also community ones 16:51:23 One of the best things about terraform in my opinion is it tries to keep writing the code simple and abstracts a lot away from the user 16:51:49 Now let me move onto the next part 16:51:56 ll the files needed are appended with a ".tf" extension. 16:52:07 When you run a terraform command all the files in the folder with the .tf extension are combined as one and run. 16:52:17 It is up to the developer if they wish to modularise into different files or put everything in one. 16:52:51 Although it is recommended to group objects in files for easier development 16:53:39 As I alluded to earlier Terraform keeps its state in a local file terraform.state by default although this can be stored remotely. 16:54:15 This state file is used when attempting to apply your code for idempotency and bindings. 16:54:27 For exapmle if you just add a new resource to existing infra it will check the state file to know that it only needs to deploy that and not the whole file again. 16:54:38 Also if you wish to delete something with a dependancy it will stop you from doing so. 16:54:58 More info on that here: https://www.terraform.io/language/state 16:55:22 and here: https://www.terraform.io/language/state/purpose 16:55:57 It is integral to how terraform works so if you are thinking of using terraform I strongly advise you read those docs 16:56:22 Finally, running the code. 16:56:30 Terraform has an inbuilt cli: https://www.terraform.io/cli/commands 16:56:39 Some of the important commands: 16:56:46 terraform init 16:56:53 This needs to be run before you run any other commands as it will install and needed plugins 16:57:29 So nirik this is where terraform will pull the required plugins for the providers. it will then store them locally for future runs. 16:57:51 If you add new providers you will need to run this command again otherwise its a run once command 16:58:22 `terraform plan` 16:58:32 This shows an output of what will be created if you run your code 16:58:53 This is very useful to ensure what you are planning to run does exactly what you want. 16:59:08 cool. So where would one want to use this over say a ansible playbook? where it's more complex or ? (I have another meeting in a few min, so may need to head out so thought I would toss this out) 17:00:18 The idea is that Terraform is better for infrastructure as code, it's generally simpler and ansible is better at provisioning machines. 17:00:18 Ok, we are at the end of your time 17:00:30 They would be used in tandem ideally 17:00:49 Dang! 17:00:58 It's interesting, but we need to end it 17:01:04 mobrien: is there still a requirement to maintain a state file? 17:01:17 The end of my talk was just about the cli 17:01:17 You can continue with discussion outside the meeting 17:01:40 Its mostly whats in the docs anyway 17:01:40 Thanks everybody for joining today 17:01:43 #endmeeting