Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rjeczalik/quick-lxc-deploy
Couple of bash scripts hacked together for effortless deploying/accessing debian-based containers.
https://github.com/rjeczalik/quick-lxc-deploy
Last synced: about 2 months ago
JSON representation
Couple of bash scripts hacked together for effortless deploying/accessing debian-based containers.
- Host: GitHub
- URL: https://github.com/rjeczalik/quick-lxc-deploy
- Owner: rjeczalik
- Created: 2012-12-24T03:18:14.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-21T22:12:54.000Z (over 11 years ago)
- Last Synced: 2024-05-01T23:45:25.794Z (8 months ago)
- Language: Shell
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
quick-lxc-deploy
================Couple of bash scripts hacked together for effortless deploying/accessing debian-based containers.
### Why?
Educational purposes. For fully featured lxc manager you may want to try:
* https://github.com/fgrehm/vagrant-lxc
* https://github.com/lxctl/lxctl
* http://libvirt.org/drvlxc.html### Usage
```
Usage: qlxc help (prints this help message)
qlxc deploy amd64|i386 []
qlxc ssh [] []
qlxc start []
qlxc stop []
qlxc rm []
```### Example usages:
To deploy Ubuntu Raring (x86_64) with default hostname (raring-amd64):
`qlxc deploy raring amd64`
To echo hostname of first container:
`qlxc ssh 0 "echo \$(hostname)"`
### Features
qlxc takes care of:
* fetching predefined set of packages and packing them into tarball in your CACHE_DIR directory
* installing new container in DEPLOY_DIR directory
* creating SSH key files in ~/.ssh/lxc_rsa for root and current user (for speed-dialing with qlxc ssh)
* creating an account for current user on a target container with rbind-mounting user's home directory
* starting/stoping/removing containers### Configuration file - ~/.qlxc.conf
qlxc uses the following options:
* PACKAGES - additional packages list to be included into container
* CACHE_DIR - path to directory storing debootstrap's tarballs
* DEPLOY_DIR - prefix path for container rootfsqlxc ssh
======Speed-dial-like access to a container.
### Speed dialing
Typical qlxc ssh output:
```
[rjeczalik@rjeczalik-ub64 rjeczalik]$ qlxc ssh[0] lenny-amd64 (10.0.3.132)
[1] lenny-i386 (10.0.3.166)
[2] squeeze-amd64 (10.0.3.107)
[3] squeeze-i386 (10.0.3.190)```
qlxc ssh connects to a container as current user - e.g. in order to login as root to squeeze-amd64 container call
`sudo qlxc ssh 2`