cookbook-virt-inst
Curtin has a test suite named vmtest. It has loads of configs for
installation that put curtin through a battery. As of this writing
it runs 192 installations on amd64 covering all supported ubuntu releases.
It runs nightly under jenkins. See example results in the
curtin-vmtest-devel-amd64 job.
If you're interested just a general use of curtin without starting a VM, see another article 'Curtin Development on uvt-kvm'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #sudo apt-get install binwalk | |
| # $ binwalk initrd | |
| # | |
| #DECIMAL HEXADECIMAL DESCRIPTION | |
| #-------------------------------------------------------------------------------- | |
| #0 0x0 ASCII cpio archive (SVR4 with no CRC), file name: ".", file name length: "0x00000002", file size: "0x00000000" | |
| #112 0x70 ASCII cpio archive (SVR4 with no CRC), file name: "kernel", file name length: "0x00000007", file size: "0x00000000" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure(2) do |config| | |
| # The most common configuration options are documented and commented below. | |
| # For a complete reference, please see the online documentation at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Author: Taihsiang Ho (tai271828) <tai271828@gmail.com> | |
| # | |
| # You could build the development env for charm-tools | |
| # Usage example: | |
| # $ lxc launch ubuntu:16.04 charm-tool-dev-16-04 | |
| # $ lxc exec charm-tool-dev-16-04 bash | |
| # $ ./bootstrap.sh | |
| # # in charm-tools folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from gevent import monkey | |
| monkey.patch_all() # Patch everything | |
| import gevent | |
| import time | |
| class Hub(object): | |
| """A simple reactor hub... In async!""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # Author: Taihsiang Ho (tai271828) tai271828@gmail.com | |
| # | |
| # Given an positive integer set Xi. The length of the set is n. | |
| # Given arbitrary a and b, and 1 <= a < b <= n. | |
| # Find the minimum average number, which is | |
| # sigma(i=a to b) Xi / (b - a + 1) | |
| # | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Description: output/input strings from stdout/stdin over Lunux system call | |
| * | |
| * Author: Taihsiang Ho (tai271828) | |
| * | |
| * Usage: gcc -g --static syscall.c | |
| * | |
| * Original source: shiwulo's os hw 3 | |
| * | |
| * Also refer to the system call summary of Linux: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set menu_color_normal=white/black | |
| set menu_color_highlight=black/light-gray | |
| if background_color 44,0,30,0; then | |
| clear | |
| fi | |
| insmod gzio | |
| set timeout=5 | |
| menuentry "Install Ubuntu Server (Focal Beta) (Pull the iso from web)" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # remember to activate your python openstack venv first | |
| echo "============= START: Begin to deploy the whole stack... ===============" | |
| time ./01-re-deploy.sh | |
| echo "============= DONE: Deployed the whole stack. =========================" | |
| echo "============= START: Begin to test the whole stack... =================" | |
| time ./02-basic-test-just-deployed.sh | |
| echo "============= DONE: Tested the whole stack. =========================" |