New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How do you suggest testing Bash scripts on multiple OS?
OK, I have purchased two OVZs from @Nick_A long time ago and they are working fine in providing me "CentOS 5" and "Debian 6" installs to test drive the opensource bash scripts
Now, if I want to test drive it on "CentOS 6", "Debian 7" and "Ubuntu 12.04", I dont want to add three more VMs to my empire. Hence my question to the community, how do you test drive your bash scripts in multiple OS? I cannot spend time installing and reinstalling the VMs with different OSes, which is time taking
Any bright ideas?
Comments
Get one KVM VPS then you can have multiple OpenVZ VPSes inside with different OSes. You don't need public IPs for these VPSes so no problem.
Or it could be UML containers inside the OpenVZ
Or if disk space permits just have the filesystem trees of different OS templaes and then use chroot
I.e. chroot /images/debian7/ /bin/bash
virtualbox or similar on your dev machine
@rds100 I remember there was one host who was using such things but OVZ inside KVM, is it good for testing? is it stable? I dont want to put more time configuring this and less time finishing what I want to finish
@Asim there is no reason why it wouldn't be stable.
It's just a matter of how much resources you have. But in your case this shouldn't be an issue since you probably will not test 20 different OSes in parallel.
it might be easier to run a vm at home to test out the script, atlest you wouldn't have to purchase anything to test you your script. https://www.virtualbox.org/ just install the iso for the distribution you want to use and test away.
@prae5 @PcJamesy not possible since I live in part of the world where electricity is not available almost half of the day (and we live off UPS and stuff which also dies at times)
@rds100 Sounds good, let me try this.
What exactly is it that you're checking for? Changes to the core of bash -- where some function you're using isn't available on some Linux flavour/version -- or paths to external binaries?
The former is pretty damn rare in my experience. Especially if you've developed on an older bash and are wondering about compatibility with a newer bash.
For the latter you can test for binaries using 'which' and exit if not found, with an advisory message.
But maybe I'm misunderstanding what you mean....
I read somewhere, I think it's Eric Raymond, that says if your bash scripts get large, maybe it's time to start using languages like Python (or Ruby, for that matter).
http://www.cygwin.com/
Ummm, use cfengine instead of baking your own scripts? CF knows what kind of machine it is running on, you can make a centrally maintained script that will be distributed to all the machines that are connected.
Best thing I've found is to find a nice SSD OVZ host, reinstall rarely takes more then 15 seconds.
RamNode usually works great for this.
>
What does that mean? I live in Karachi and use virtualbox all the time. It's great for testing shit. You don't have to install guest OSes multiple times. You just make one install and then clone it every time you want to customize it or test something that might potentially break things.
As far as downloading goes downloads usually resume from the point of interruption. If that's not happening for you you should download via torrents.
Another thing you can do is download the net install disc for each distro. This is smaller and will pull the rest of the packages during installation based on what you need.
Thanks all, I am test driving the OVZ on KVM approach
@Abdussamad I guess you have no idea how much Lahore is effected with loadshedding and unannounced power outages. So right now, for the record, I have 4 x 1KVA UPS for each bedroom and the living room + I dedicated UPS for all the modems, Raspberry-Pis and the laptop. Each UPS gives me 2 hours of backup. Even then I am not 100% up all the time duh
@Asim sounds like you need a generator then No idea what the gasoline/diesel costs there though.
@rds100 yes, as a backup generator is there but the fuel costs are too high here. a little over $1 per litre of fuel. UPS are more economical
Thanks for the advice on OVZoverKVM, still not finished doing this yet but seems like the way to go
Still no power for 12hours per day? or did it get better now?
@Asim That's a sad story.
If you have any specific scripts that you need tested PM me and I'll do what I can. I have an unused VPS that is currently just sitting there.
Can you ship me around 10.000 liters for that price?
LowEndDiesel.com is available
@William yes, we have energy crisis. So while some areas and cities which are politically influenced may see 30min of power outage, some major cities have 12 hours of power outage per day (one hour of electricity after one hour of blackout).
@snelweg LOL, I wish I could do that. Please note its litre and not gallon
@Abdussamad sure, will let you know. Right now I am following @rds100's awesome suggestion and successfully deployed OVZ on @torqhost KVM but the networking is not working in the containers. Banging my head to get that working. Lets see
If anyone can help me track down what wrong, I would be obliged!!
We pay $1.80 per liter for diesel and $ 2.27 per liter for gasoline. So, there is a proffit to be made for LET / LEB minded people, it's all in the volume.
@Asim did you add an ip address to the container?
vzctl set 101 --ipadd 192.168.1.101 --save
@rds100 thanks, you are awesome