*** sysadmin has quit (Ping timeout: 480 seconds) | 11:37 | |
*** jelkner has quit (None) | 11:55 | |
*** jelkner has quit (Remote host closed the connection) | 11:55 | |
*** jelkner has quit (Quit: Leaving) | 12:02 | |
*** svaye has quit (None) | 12:02 | |
*** tboimah has quit (Ping timeout: 480 seconds) | 12:56 | |
mulbah | Good morning Mr. Cole | 14:13 |
---|---|---|
mulbah | we are so sorry we are late | 14:13 |
tboimah | Good morning ubuntourist | 14:13 |
ubuntourist | Hi, tboimah mulbah | 14:15 |
ubuntourist | I wasn't watching my screen. | 14:15 |
ubuntourist | And I'm sorry: I did not find my simple examples for network programming. | 14:16 |
ubuntourist | So I was just looking and I found a web page that doesn't look too hard: | 14:16 |
ubuntourist | https://www.geeksforgeeks.org/python-network-programming/ | 14:16 |
ubuntourist | It offers a VERY basic introduction that shows two Python3 programs communicating, | 14:17 |
ubuntourist | but the programs do not do very much. It is just designed to show you that Python can | 14:18 |
ubuntourist | do networking and it gives you a basic taste of IP numbers and ports. | 14:18 |
ubuntourist | So, what have you two been up to since we last met on Friday? | 14:19 |
mulbah | reading the book | 14:21 |
mulbah | but we don't have more time to practice be cause of computer issue | 14:21 |
mulbah | we both computer are giving us problem | 14:22 |
mulbah | so we can on practice if we come to the lab | 14:22 |
tboimah | sure | 14:22 |
ubuntourist | uh-oh. Can you document the problems? Hardware? Software? Error messages? | 14:23 |
mulbah | Hardware | 14:23 |
mulbah | problem | 14:23 |
ubuntourist | As system administrators, you'll want to be able to document such problems and | 14:24 |
ubuntourist | try to get someone with control of your budget to fix the problem without buying a completely new | 14:24 |
mulbah | my computer keyboard, battery, and chager is giving problem | 14:24 |
ubuntourist | computer. | 14:24 |
ubuntourist | How reliable is wall power? I know you've spoken about needing to restart | 14:25 |
mulbah | *Charger* | 14:25 |
ubuntourist | generators before. But, if you can usually get reliable power from a wall, you can survive for | 14:26 |
mulbah | what is wall power? | 14:26 |
ubuntourist | a long time without a battery. | 14:26 |
ubuntourist | I mean electrical power that is not coming from a battery. Usually coming from | 14:26 |
ubuntourist | plugging your computer into a wall. | 14:27 |
ubuntourist | The keyboard is another issue altogether.. But you might be able to solve that | 14:27 |
ubuntourist | by plugging a USB keyboard into a USB socket and using that instead of the built-in | 14:28 |
ubuntourist | keyboard. Temporary solutionts, but you need to be creative when solving hardware troubles. | 14:28 |
ubuntourist | Otherwise, this project will just limp along until it dies. | 14:29 |
ubuntourist | jelkner, Hi. I learned a new trick: | 14:29 |
jelkner | Good morning ubuntourist | 14:30 |
ubuntourist | jelkner, never mind. I just tried it again, but the trick didn't work. ;-) | 14:30 |
mulbah | Good morning Jeff | 14:31 |
ubuntourist | jelkner, C'est la vie. | 14:31 |
ubuntourist | jelkner, So we're talking a bit about hardware failure on the laptops, and I'm | 14:31 |
jelkner | ubuntourist, i have to report back to you on how your pupil, tboimah was a hero on Saturday | 14:31 |
ubuntourist | proosing stop-gap measures. | 14:31 |
jelkner | hmmm. | 14:31 |
ubuntourist | "proposing" | 14:32 |
ubuntourist | jelkner, I'll let you run along. Later... | 14:32 |
jelkner | ok, i just finished attendance | 14:33 |
*** JulianMolina has quit (None) | 14:33 | |
jelkner | ubuntourist, i wanted to share what happened on saturday | 14:33 |
ubuntourist | jelkner, oops. I misread: Not enough caffeine and thought you had to run off to your students. Please share. | 14:34 |
jelkner | i am trying to teach a python class from 7 to 9 am on saturdays | 14:34 |
jelkner | i wanted to use the screen sharing and recording that you taught your students | 14:34 |
jelkner | scooper thought he had it down, but he didn't | 14:34 |
jelkner | we fumbled around for an hour | 14:34 |
jelkner | until.. | 14:34 |
jelkner | tboimah showed up and made it all work! | 14:35 |
jelkner | we ended up having just the class we were hoping to have | 14:35 |
ubuntourist | jelkner, So... tmate? Or script and scriptreplay? (Or both?) | 14:35 |
jelkner | all thanks to the sys admin skills of tboimah | 14:35 |
jelkner | both | 14:35 |
ubuntourist | tboimah, Nice! | 14:35 |
tboimah | Good morning yeah | 14:36 |
jelkner | tboimah also wisely suggested i run it from the mcss student server | 14:36 |
tboimah | yeag | 14:36 |
tboimah | yeah | 14:36 |
jelkner | when svaye had trouble with terminal size on her own computer | 14:36 |
jelkner | tboimah was skilled, responsive and quick on his feet | 14:36 |
jelkner | a resounding testament to both him and his tutor! | 14:37 |
ubuntourist | The server provides a common denominator, and remains up among other things. | 14:37 |
jelkner | +1 | 14:37 |
jelkner | anyway, it worked so well | 14:37 |
ubuntourist | (No "custom" software that other users don't have if everyone's using the same beastie.) | 14:37 |
jelkner | it builds my confidence that we are making the kind of progress we need to make | 14:37 |
jelkner | ok, i'll let you work with tboimah and mulbah | 14:38 |
jelkner | but let's plan on getting together sometime early in january | 14:38 |
ubuntourist | jelkner, my concern is hardware and network failure at this point. The humans are good. ;-) | 14:38 |
jelkner | either in Clarendon or back at the saloon | 14:38 |
jelkner | so i need a summary of the hardware | 14:38 |
jelkner | ubuntourist, i need to get 3 of them to pass PCEP | 14:39 |
*** Jmolina has quit (Quit: Page closed) | 14:39 | |
jelkner | so that i can go to Monrovia in august | 14:39 |
jelkner | i'll be bringing more laptops | 14:39 |
jelkner | and i will be able to work with mulbah and tboimah while i'm there on documenting and maintaining the lab | 14:39 |
jelkner | that will be a big help | 14:39 |
ubuntourist | mulbah, tboimah, hear that, gentlemen? New hardware -- IF folks can pass. | 14:39 |
jelkner | they know that | 14:40 |
jelkner | i need to stop saying it | 14:40 |
jelkner | it is in their hands now | 14:40 |
jelkner | but i want to do all i can to provide support | 14:40 |
ubuntourist | tboimah, mulbah, you should probably keep a hardware log book and document | 14:40 |
jelkner | a spreadsheet works best | 14:41 |
jelkner | i'll show them how to do that when i arrive | 14:41 |
ubuntourist | hardware failures. Include the date of failure. Or the date when you noticed it. And a unique | 14:41 |
jelkner | ok, gotta go | 14:41 |
ubuntourist | identifier for the computer that failed. | 14:41 |
jelkner | thanks for all your great work, ubuntourist! | 14:41 |
jelkner | it is really showing results | 14:41 |
jelkner | ACTION signs off for now... | 14:42 |
ubuntourist | jelkner, farewell. | 14:42 |
*** jelkner has quit (Quit: Leaving) | 14:42 | |
ubuntourist | So. mulbah, tboimah, Sorry I'm not better prepared with a lesson plan. | 14:42 |
ubuntourist | that's entirely my fault for being lazy and distracted. | 14:43 |
ubuntourist | Do take a look at the web page for simple network in Python code that I pasted above. | 14:44 |
mulbah | alright | 14:44 |
ubuntourist | A little more complicated but also a good start: | 14:45 |
ubuntourist | https://realpython.com/python-sockets/ | 14:45 |
ubuntourist | But you do not need to become expert Python programmers or expert network programmers. | 14:46 |
ubuntourist | That is just to give you a "feel" for some of the stuff we've been chatting about. | 14:46 |
ubuntourist | Once you have seen the simple Python programs work, it should give you | 14:47 |
ubuntourist | insight: "Oh! So ssh and Firefox and Chrome and web servers are just doing | 14:47 |
ubuntourist | more complicated versions of these simple Python programs! I get it!" | 14:48 |
ubuntourist | Anyway, since I am unprepared (again) do either of you, tboimah or mulbah | 14:48 |
ubuntourist | have questions or tricks you'd like to show off? | 14:49 |
*** Jmolina has quit (Quit: Page closed) | 14:49 | |
ubuntourist | tboimah, mulbah, do etiher of you have a virtual computer running with an OS installed? | 14:50 |
mulbah | Yeah | 14:51 |
ubuntourist | ACTION wonders if it is possible to tmate into a virtual machine... Probably "yes" but there may be a special trick to it... | 14:52 |
ubuntourist | mulbah, what are you running? (Which distribution, which release?) | 14:53 |
ubuntourist | mulbah, "lsb_release -a" provides the answer to that question. | 14:54 |
tboimah | ubuntun | 14:54 |
mulbah | unbuntu | 14:54 |
ubuntourist | tboimah, which release of Ubuntu? | 14:54 |
mulbah | 24 | 14:55 |
ubuntourist | mulbah, that's not a release number. I'm guessing you mean 22.04? | 14:55 |
mulbah | yeah | 14:55 |
tboimah | 20.04 | 14:55 |
ubuntourist | Ubuntu release numbers refer to the year and month of release. | 14:56 |
ubuntourist | So that is from April 2022. It is the most recent Long-Term-Support (LTS) release | 14:56 |
ubuntourist | and is the most stable. There are releases between LTS releasses that happen every six months. | 14:57 |
ubuntourist | So there is a 22.10, a 23.04, and a 23.10 release. But because we | 14:58 |
ubuntourist | are already into December, we should not upgrade. The next LTS release is April 2024. | 14:58 |
ubuntourist | Upgrading from one release to another is a more complex and tricky process than "apt update". | 14:59 |
ubuntourist | When upgrading to a new release ALWAYS go from an LTS to an LTS. Or... | 15:00 |
ubuntourist | if you choose to experiment on your own, DO NOT SKIP any release. | 15:01 |
ubuntourist | So, for example, it is okay to go from 22.04 to 24.04. But it is NOT OKAY | 15:01 |
ubuntourist | to go from 22.04 to 23.10. If you want to get to 23.10, you would need to upgrade | 15:02 |
ubuntourist | 22.04 to 22.10. Then 22.10 to 23.04. Then 23.04 to 23.10. | 15:02 |
ubuntourist | When you upgrade to a new release, it often REMOVES application packages that you have | 15:03 |
ubuntourist | explicitly installed, because the new opearating system release has new "shared libraries" that | 15:03 |
ubuntourist | may not be compatible with some applicatioon you have installed. | 15:04 |
ubuntourist | Think about Python and the "import" statement: Let's say that you created | 15:05 |
ubuntourist | some Python program that is really helpful to you. And your Python program uses a lot of import | 15:05 |
ubuntourist | statements. | 15:05 |
ubuntourist | Now, you do a major upgrade, and all of the Python libraries change. In the new version, | 15:06 |
ubuntourist | some function that you have imported gets new features, and is called with different arguments. | 15:06 |
ubuntourist | Suppose, suddenly, print is no longer | 15:07 |
ubuntourist | print("Hello world") | 15:07 |
ubuntourist | but now it is | 15:07 |
ubuntourist | print(language="english", text="Hello world") | 15:07 |
ubuntourist | All of your old code is now broken, because your old print() syntax in incorrect. | 15:08 |
ubuntourist | So, when you are upgrading releases, if the release does not include an application that you have | 15:09 |
ubuntourist | expliciitly installed, the upgrade process might remove it. | 15:09 |
ubuntourist | (might remove it because it doesn't know if your application uses a library that was updated.) | 15:10 |
ubuntourist | tboimah, mulbah have either of you used a program named "pip"? | 15:11 |
mulbah | no we haven't be we have hear about it | 15:11 |
ubuntourist | OK. This is another IMPORTANT thing for a systems administrator to know: | 15:12 |
ubuntourist | Unfortunately, in the current state of Linux, there are competing packaging | 15:13 |
ubuntourist | systems that often do not play nicely together, but live on the same computer.. | 15:13 |
ubuntourist | "apt" (and its sister "dpkg") are the king and queen: They work well together, | 15:14 |
ubuntourist | and maintain the health of most of your operating system. Whenever you need | 15:14 |
ubuntourist | to install or upgrade an application, look hard for a Debian (or Ubuntu) package: | 15:15 |
ubuntourist | That will mean that the package is able to be maintained by apt and dpkg. | 15:15 |
ubuntourist | But here's the problem: | 15:16 |
*** tboimah has quit (Ping timeout: 480 seconds) | 15:16 | |
ubuntourist | tboimah, mulbah, actually before I continue, let me open a tmate session on the server... | 15:16 |
mulbah | alright | 15:17 |
ubuntourist | ssh xu2W8hYmfY2jrQjSxwYRBqfrn@lon1.tmate.io | 15:17 |
mulbah | connection close | 15:18 |
ubuntourist | Hmmm... | 15:18 |
ubuntourist | Try again... I'm gussing that's a network glitch. | 15:18 |
ubuntourist | Ah, there we go. | 15:19 |
ubuntourist | tboimah, mulbah, actually before I continue, let me open a tmate session on the server... | 15:20 |
ubuntourist | ssh xu2W8hYmfY2jrQjSxwYRBqfrn@lon1.tmate.io | 15:20 |
ubuntourist | mulbah, let's wait a second for tboimah to catch up / tmate in. | 15:20 |
ubuntourist | dpkg --get-selections | grep "^python3" | most | 15:23 |
mulbah | Mr. Cole tboimah computer when off | 15:25 |
ubuntourist | Poo. | 15:25 |
ubuntourist | OK I'll go back to putting the comments here. GIve me a second... | 15:26 |
ubuntourist | So the dpkg list is what Ubuntu knows about. apt and dpkg will | 15:26 |
ubuntourist | keep track of these, upgrade them and maintain them. | 15:26 |
ubuntourist | And they will keep track of "dependencies". Let's look at dependencies | 15:27 |
ubuntourist | for a minute. I'm going to pick a package from that list of python3 packages... | 15:27 |
ubuntourist | apt-cache show python3-jinja2 | 15:28 |
ubuntourist | The description says "Jinja2 is a template engine written in pure Python." | 15:29 |
ubuntourist | (It gives more information too.) | 15:29 |
ubuntourist | apt-cache depends python3-jinja2 | 15:30 |
ubuntourist | Because jinja2 is a python package, obviously, it cannot work if there is no Python interpreter. | 15:31 |
*** tboimah has quit (Ping timeout: 480 seconds) | 15:31 | |
ubuntourist | Therefore, python3 is a "dependency" Jinja2 depends on Python 3. | 15:31 |
ubuntourist | The dependency list also tells us that installing pytjon3-jinja2 will BREAK | 15:32 |
ubuntourist | an older package named python-jinja2. It even tells us that python3-jinja2 | 15:33 |
ubuntourist | replaces python-jinja2. | 15:33 |
ubuntourist | So. package depend on other packages. | 15:33 |
ubuntourist | If you remove a package, apt and dpkg will tell you "Hey, you are removing a package that | 15:34 |
ubuntourist | some other package depends upon. Do you want me to remove all of them? Or do you want to stop, | 15:34 |
ubuntourist | and I will remove NONE of them?" | 15:34 |
ubuntourist | If I were to say "sudo apt remove python3" I would get a huge list | 15:35 |
ubuntourist | of dependencies. | 15:35 |
ubuntourist | It would try to remove 41 other packages | 15:36 |
ubuntourist | (Well probably more. That is a conservative estimate based on | 15:36 |
ubuntourist | dpkg --get-selections | grep "^python3" | wc -l | 15:36 |
ubuntourist | Heres the problem: | 15:37 |
ubuntourist | Python has its own, independent package manager named pip. | 15:37 |
ubuntourist | The command "pip list" will show us what Python knows about | 15:38 |
ubuntourist | Oh look! | 15:38 |
ubuntourist | dpkg --get-selections | grep "^python3" | 15:38 |
mulbah | yeah | 15:39 |
mulbah | pip or pip3 | 15:39 |
ubuntourist | showed us a package named "python3-jinja2" BUT | 15:39 |
ubuntourist | pip list | 15:39 |
mulbah | you can use them to install python module | 15:39 |
ubuntourist | also shows us a package named "Jinja2"... | 15:39 |
mulbah | like "pip install gasp" | 15:39 |
ubuntourist | BIG PROBLEM: If you use "pip" to upgrade, it MIGHT upgrade Jinja2 to a new version... | 15:40 |
ubuntourist | But apt and dpkg will NOT know about the change!!! You've just "hosed" (American slang for | 15:41 |
ubuntourist | hopelessly broken) something. | 15:41 |
ubuntourist | If there is a Debian package named "python3-gasp" you should almost always | 15:42 |
ubuntourist | sudo apt install python3-gasp | 15:43 |
ubuntourist | instead of | 15:43 |
ubuntourist | sudo pip install gasp | 15:43 |
ubuntourist | There are better ways to handling this. jelkner has probably talked about at least one: | 15:44 |
mulbah | you are not force to use sudo | 15:44 |
mulbah | you can just use "pip install gasp" | 15:44 |
mulbah | and it will work | 15:45 |
ubuntourist | You can create Python virtual environments or use pip to install packages locally. | 15:45 |
ubuntourist | But it is still very important to understand that packaging systems can compete with each other. | 15:45 |
ubuntourist | Also, if you are using "pip install" on a server without "sudo" you are installing for ONE user | 15:46 |
mulbah | so Mr. Cole which you think will be preface to use to install "pip or pip3" | 15:46 |
mulbah | oh okay | 15:46 |
ubuntourist | mulbah, pip3. I was just typing pip because I am lazy and on my system I have an alias so that pip means pip3. | 15:47 |
ubuntourist | But the problem doesn't change. If you use pip3 with sudo, so that it installs for ALL users, | 15:48 |
ubuntourist | then you have broken the Debian package that installs the same stuff. | 15:48 |
mulbah | alright | 15:49 |
ubuntourist | Because jelkner has taught you to not use sudo for pip, then you are okay... with Python. You will still need | 15:50 |
ubuntourist | to remember to do it for every user instead of just once, but that's okay. | 15:50 |
mulbah | No it was not jeff that taught me that | 15:51 |
ubuntourist | But what about the programming language Rust? It uses "rustup" to maintain Rust packages. | 15:51 |
mulbah | I learn that on my own | 15:51 |
ubuntourist | Or the Perl programming laingage? It uses "cpan" to maintain Perl packages. | 15:51 |
ubuntourist | The point I'm trying to make is that you really want to be careful if you need to upgrade something. | 15:52 |
ubuntourist | Suppose there is a Debian package for GASP -- python3-gasp. But, someone has improved GASP without | 15:53 |
ubuntourist | creating a new Debian package with the improvements. You need to ask yourself "Do I REALLY need that new | 15:54 |
ubuntourist | feature for ALL users? Or can I wait?" | 15:54 |
ubuntourist | If you can wait, you will be safer waiting until "apt full-upgrade" offers a new version of python3-gasp. | 15:55 |
ubuntourist | If you really cannot wait, you can upgrade for everyone with "sudo pip install -U gasp" | 15:56 |
ubuntourist | So, getting back to releases... | 15:57 |
ubuntourist | In April 2024, we will be upgrading our systems from 22.04 LTS to 24.04 LTS. | 15:57 |
ubuntourist | And dependencies will break. And packages will be removed. And MAY need to be reintalled, if they | 15:58 |
ubuntourist | are important enough. | 15:58 |
ubuntourist | For example, maybe the upgrade will remove tmate. | 15:58 |
ubuntourist | We will need to find and install tmate again or find a substitute program that provides the same function. | 15:59 |
ubuntourist | One thing that I do regularly: | 15:59 |
ubuntourist | dpkg --get-selections > installed_debs.txt | 16:00 |
ubuntourist | pip2 freeze > installed_pip2.txt | 16:00 |
ubuntourist | pip3 freeze > installed_pip3.txt | 16:00 |
*** mulbah has quit (Ping timeout: 480 seconds) | 16:01 | |
ubuntourist | This gives me three lists file: All of the Debian / Ubuntu packages, all of the old, obsolete pip2 packages and all of the pip3 packges | 16:01 |
ubuntourist | Then, before I do a major release upgrade, I save those files somewhere safe. | 16:02 |
ubuntourist | After the upgrade, I go through my "Captain's Log" journal, where I keep a diary of | 16:02 |
ubuntourist | all of my activities, plus I look at those three files to determine if there is anything that I use a lot | 16:03 |
ubuntourist | that I really need to re-install. | 16:03 |
ubuntourist | And, I see that we are over time for today and you've dropped out. | 16:03 |
ubuntourist | So I will call it quits. | 16:03 |
*** ubuntourist has quit (Quit: Leaving) | 16:04 | |
*** mcssguest_ has quit (Ping timeout: 480 seconds) | 16:09 | |
*** shmohamud has quit (Remote host closed the connection) | 22:33 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!