Here are logs when running Ubuntu Core snappy within KVM.
Reference
https://developer.ubuntu.com/en/snappy/start/using-snappy/
download a snappy image and run that image under KVM.
root@ubuntu:~# wget http://releases.ubuntu.com/15.04/ubuntu-15.04-snappy-amd64-generic.img.xz
root@ubuntu:~# unxz ubuntu-15.04-snappy-amd64-generic.img.xz
root@ubuntu:~# qemu-system-x86_64 --nographic ubuntu-15.04-snappy-amd64-generic.img --enable-kvm -m 512
|
access to the snappy.
username : ubuntu
credentials : ubuntu
Ubuntu 15.04 localhost.localdomain ttyS0
localhost login: ubuntu
Password:
(amd64)ubuntu@localhost:~$ sudo su -
(amd64)root@localhost:~#
(amd64)root@localhost:~# snappy info
release: ubuntu-core/15.04/stable
architecture: amd64
frameworks: webdm.canonical
apps:
(amd64)root@localhost:~# snappy list -v
Name Date Version Developer
ubuntu-core 2016-01-20 13 ubuntu*
webdm 2016-01-20 0.11 canonical*
generic-amd64 2016-01-20 1.4 canonical*
|
install frameworks, “docker”.
You can not use apt-get.
When installing frameworks/apps on Ubuntu Core, you need to install those via snappy command.
(amd64)root@localhost:~# snappy install docker
Installing docker
Starting download of docker
8.36 MB / 8.36 MB [========================================] 100.00 % 1.28 MB/s
Done
Starting download of icon for package
21.58 KB / 21.58 KB [=====================================] 100.00 % 73.16 KB/s
Done
Name Date Version Developer
ubuntu-core 2016-01-20 13 ubuntu
docker 2016-02-12 1.6.2.005 canonical
webdm 2016-01-20 0.11 canonical
generic-amd64 2016-01-20 1.4 canonical
(amd64)root@localhost:~#
(amd64)root@localhost:~# snappy info
release: ubuntu-core/15.04/stable
architecture: amd64
frameworks: docker.canonical, webdm.canonical
apps:
|
install an application, ‘hello-world’ via snappy.
(amd64)root@localhost:~# snappy install hello-world
Installing hello-world
Starting download of hello-world
(amd64)root@localhost:~# snappy info
release: ubuntu-core/15.04/stable
architecture: amd64
frameworks: docker.canonical, webdm.canonical
apps: hello-world.canonical
|
look at /dev/sda
(amd64)root@localhost:~# parted /dev/sda print
Model: ATA QEMU HARDDISK (scsi)
Disk /dev/sda: 3900MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 4194kB 8389kB 4194kB grub bios_grub
2 8389kB 75.5MB 67.1MB fat32 system-boot boot, esp
3 75.5MB 1149MB 1074MB ext4 system-a
4 1149MB 2223MB 1074MB ext4 system-b
5 2223MB 3899MB 1676MB ext4 writable
(amd64)root@localhost:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 237M 0 237M 0% /dev
tmpfs 49M 4.7M 45M 10% /run
/dev/sda3 976M 623M 287M 69% /
/dev/sda5 1.6G 93M 1.4G 7% /writable
tmpfs 245M 4.0K 245M 1% /etc/fstab
tmpfs 245M 0 245M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 245M 0 245M 0% /sys/fs/cgroup
tmpfs 245M 0 245M 0% /var/lib/sudo
tmpfs 245M 0 245M 0% /tmp
tmpfs 245M 0 245M 0% /mnt
/dev/sda4 976M 1.3M 908M 1% /writable/cache/system
/dev/sda2 63M 52M 12M 82% /boot/efi
tmpfs 49M 0 49M 0% /run/user/1000
|
system-a : for ubuntu core
system-b : for ubuntu core
writable : for apps and frameworks
When upgrading Ubuntu Core, install new Core images into /dev/sda4(system-b) instead of applying updates to /dev/sda3 and boot /dev/sda4(system-b).
apps and frameworks are installed under writable partition called ‘writable(/dev/sda5)’
(amd64)root@localhost:~# ls -l /apps/
total 16
drwxr-xr-x 2 root ubuntu 4096 Feb 12 03:20 bin
drwxr-xr-x 3 root root 4096 Feb 12 03:05 docker
drwxr-xr-x 3 root root 4096 Feb 12 03:19 hello-world.canonical
drwxr-xr-x 3 root ubuntu 4096 Jan 20 07:02 webdm
(amd64)root@localhost:~# ls -l /apps/docker/
total 4
drwxr-xr-x 6 clickpkg clickpkg 4096 Feb 12 03:05 1.6.2.005
lrwxrwxrwx 1 root root 9 Feb 12 03:05 current -> 1.6.2.005
(amd64)root@localhost:~# ls -l /apps/hello-world.canonical/
total 4
drwxr-xr-x 5 clickpkg clickpkg 4096 Feb 12 03:19 1.0.18
lrwxrwxrwx 1 root root 6 Feb 12 06:01 current -> 1.0.18
|
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.