Score:0

Is there a way to pin a version of sudo apt upgrade for the whole Os/all packages?

cn flag

Hi I'm writing some bash scripts to install some VMs

I run...

sudo apt update -y

sudo apt upgrade -y

Those work fine...

But is there a way to make sure that if I run those 2 commands somewhere in the future to install new VMs that we get the exact same versions on the newer machines?

I just want to make sure that my script is repeatable.

vidarlo avatar
ar flag
Why would you want that? If you require static software update a VM to a known state, and generalize that image?
cn flag
I'm writing script to install XYZ platform on dev. Now say I'm ready to go live on prod 2 weeks from now. How do i make sure that the prod has the exact same versions. So we cannot have the dev env on old versions and production platform on newer versions. we make sure we deploy same versions and then at som point we test the dev platform for patches and then apply patches to prod.
vidarlo avatar
ar flag
Create images and don't run upgrades on them?
cn flag
Ah yeah I guess I can create base image with the current "upgrade" and then run scripts that install specific version of packages.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.