My Life in WordsAll about information and technology
|
关于Conjure-upConjure-up是一个Canonical公司发布的可以用来简化部署工作的一个工具。它用"spells"的概念作为软件应该怎样被部署的描述(yaml, charms 以及部署脚本)。 Conjure-up可以部署spell到三种位置:
安装Conjure-up$sudo snap install conjure-up --classic 查看发布的Spell$conjure-up 这里列出了所有公开发布的spell。你可以选择你要部署的。
0 Comments
Install snap$sudo apt update $sudo apt install snapd $sudo apt install snapcraft Use snap$snap list Since you just install snap, there is no snaps installed on your machine. Try "snap install hello-world" as it suggested. Run snapsEach snap might include multiple related commands, with a default command that has the same name as the snap itself. Additional commands are prefixed with the snap name: $hello-world View details about installed snaps$ snap list Name Version Rev Developer Notes core 16-2 1577 canonical - hello-world 6.3 27 canonical - Check the installation directory$cd /snap/hello-world/current $ tree . ├── bin │ ├── echo │ ├── env │ ├── evil │ └── sh └── meta ├── gui │ └── icon.png └── snap.yaml 3 directories, 6 files Find snaps $ snap find compiler Name Version Developer Notes Summary ldc2 1.2.0 ldc classic D compiler with LLVM backend go 1.8.1 mwhudson classic Go programming language compiler, linker, stdlib llgo 0 axw classic llgo compiler toolchain and interpreter go14-lbo 1.4.3 lbo - Go programming language compiler part-cython 0.24.1 powersj - Optimising static compiler for Python and C go16-lbo 1.6.3 lbo - Go programming language compiler vitetris 0.57 vitetris - Console based version of Tetris rpgen v0.1.0 rgrannell1 - compile multiple scripts into a single cloud-init friendly script bcc 0.3.0-20170420-1809-e512f02 ev - BPF compiler collection You must also get to know Linuxkit if you are a Docker fan like me. Linuxkit is a secure, lean and portable Linux subsystem that can provide Linux container functionality as a component of a container platform. Linuxkit project: https://github.com/linuxkit/linuxkit Linuxkit announcement: https://blog.docker.com/2017/04/introducing-linuxkit-container-os-toolkit/ Install DockerIf Docker isn't be installed on your system yet, you need install it first. If your system is Ubuntu 16.04 as mine, you can follow the steps at https://docs.docker.com/engine/installation/linux/ubuntu/. Anyway, you can verify that Docker CE or Docker EE is installed correctly by running the hello-world image. $ sudo docker run hello-world Install MobyThe Moby Project is a new open-source project to advance the software containerization movement and help the ecosystem take containers mainstream. It provides a library of components, a framework for assembling them into custom container-based systems and a place for all container enthusiasts to experiment and exchange ideas. It is announced at https://blog.docker.com/2017/04/introducing-the-moby-project/. Moby project: https://github.com/moby/moby Install moby: $go get -u github.com/docker/moby/src/cmd/moby Add moby to my PATH: $export PATH=$PATH:$(pwd)/moby/bin Start Linuxkit$cd moby/src/github.com/linuxkit/linuxkit/ $sudo moby build linuxkit.yml linuxkit will be producted at ../bin/ directory. $export $PATH=$PATH:$(pwd)../bin/ $linuxkit run linuxkit Check the process by #pstree You can check the running container by: #runc list Access containerFirst to comfirm that nigix container is running within the host's network stack. Send http request to the host. Check the configuration by runc. Run docker on LinuxkitLinuxkit is configured as read-only system. You can try to execute "touch a.c". It would prompt "touch: a.c: Read-only file system". Let's run a docker on linuxkit to replace the nginx before. Compile and start the dockerInput "halt" once you want to terminated the console. Go to the ./linuxkit/examples directory, there is a docker.yml. $sudo moby build docker.yml $linuxkit run docker Check the started container services. Enter docker container and check the docker information. / # runc exec -t docker sh / # docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 17.04.0-ce Storage Driver: overlay2 Backing Filesystem: tmpfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: containerd version: 422e31ce907fd9c3833a38d7b8fdd023e5a76e73 runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228 init version: 949e6fa Security Options: seccomp Profile: default Kernel Version: 4.9.22-moby Operating System: Alpine Linux v3.5 (containerized) OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 992.3MiB Name: moby-525400123456 ID: T4BQ:WVPV:PDA6:DNLN:NFQE:IMFY:LV6B:HXKJ:BX6R:SPEE:IUML:HA54 Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false The system available space is not big. Node.js docker image that based on Alpine Linux is smaller than most distribution base images. / # df -h Filesystem Size Used Available Use% Mounted on tmpfs 496.2M 208.2M 288.0M 42% / tmpfs 64.0M 0 64.0M 0% /dev tmpfs 496.2M 208.2M 288.0M 42% /lib/modules tmpfs 496.2M 0 496.2M 0% /sys/fs/cgroup tmpfs 496.2M 208.2M 288.0M 42% /var/lib/docker tmpfs 496.2M 208.2M 288.0M 42% /var/lib/docker/overlay2 / # docker run --rm -it node:7.9-alpine sh Unable to find image 'node:7.9-alpine' locally 7.9-alpine: Pulling from library/node 709515475419: Pull complete 278538de9ce7: Pull complete 732a325308f5: Pull complete Digest: sha256:aa698f64736e0a8ae1c4d8ffaf62fc82fc81a2140d3f1c8d1457f9e491b1b444 Status: Downloaded newer image for node:7.9-alpine [ 676.758049] docker0: port 1(vethcc8cc58) entered blocking state [ 676.758811] docker0: port 1(vethcc8cc58) entered disabled state [ 676.759352] device vethcc8cc58 entered promiscuous mode [ 676.761749] IPv6: ADDRCONF(NETDEV_UP): vethcc8cc58: link is not ready [ 676.781115] IPVS: Creating netns size=2104 id=6 [ 676.781654] IPVS: ftp: loaded support on port[0] = 21 [ 676.865002] eth0: renamed from veth50565d4 [ 676.865565] IPv6: ADDRCONF(NETDEV_CHANGE): vethcc8cc58: link becomes ready [ 676.866160] docker0: port 1(vethcc8cc58) entered blocking state [ 676.866645] docker0: port 1(vethcc8cc58) entered forwarding state [ 676.867207] IPv6: ADDRCONF(NETDEV_CHANGE): docker0: link becomes ready You can try more on Linuxkit.
First, you need make your system full updated.
I used GCC 5.0. It complained on multiple definition of some string-related functions when link 400.perlbench, like here: https://vmakarov.fedorapeople.org/spec/spec2006.toolbox/gcc/log/20150117/747.log For this particular issue, it is caused by GCC 5 that has moved to a new default C standard. Add "-std=gnu89" to CPORTABILITY flags of perlbench solved it.
Sometime you want to rebuild a package on Ubuntu, here are the steps you need to do at your system:
$sudo apt-get build-dep gcc $dpkg-source -x gcc*.dsc $dpkg-buildpackage -us -uc This will do everything to make full binary and source packages for you. GDB provide several ways to check registers when you debug a programme with GDB.
|
AuthorThis is a blog that is about my works on Benchmarking Performance, Compiling Optimization, Optimize Compile, Parallel Programming, Virtualization, Container, Docker, Moby, Linuxkit, Open Source and any others. Archives
August 2018
Categories |