LXC4U.Ubuntu 12.04 ¹× Ubuntu 12.04 ÄÁÅ×À̳ʿ¡¼ LXC °ü¸® µµ±¸¸¦ Á¦°øÇÕ´Ï´Ù. | |
Áö±Ý ´Ù¿î·Îµå |
LXC4U. ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- MIT/X Consortium Lic...
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Reuven V. Gonzales
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://github.com/ravenac95/
LXC4U. ű×
LXC4U. ¼³¸í
LXC4U´Â Ubuntu 12.04 ¹× Ubuntu 12.04 ÄÁÅ×À̳ʿ¡¼ LXC °ü¸®¸¦À§ÇÑ µµ±¸¸¦ Á¦°øÇÏ´Â Python ¸ðµâÀÔ´Ï´Ù. ´Ù¸¥ ÄÁÅ×À̳ʴ Áö¿øµÇÁö ¾Ê½À´Ï´Ù (¾ÆÁ÷?) - ¿À¹ö·¹À̸¦ »ç¿ëÇÏ¿© ÄÁÅ×À̳ʸ¦ ¸¸µì´Ï´Ù. exampleCreate exampleCreate¶ó´Â Container exampless1 : import lxc4uest1_lxc = lxc4u.create ( 'test1') # ±â´Ù¸² ... # containertest1_lxc¸¦ ½ÃÀÛÇϽʽÿÀ. start () test1À» ¿À¹ö·¹ÀÌÇÏ´Â ÄÁÅ×ÀÌ³Ê ¸¸µé±â : import lxc4utest1_overlay_lxc = lxc4u.create ( 'test1_overlay', base = 'test1', ¿À¹ö·¹ÀÌ = # containertest1_overlay_lxc.start () test1_overlay_lxc.destroy ()¸¦ ½ÃÀÛÇϽʽÿÀ TEST1ÀÇ ¿©·¯ ¿À¹ö·¹ÀÌ°¡ÀÖ´Â ÄÁÅ×À̳Ê. ´ëºÎºÐÀÇ ¿À¹ö·¹ÀÌ°¡ °¡Àå ³ôÀº ¿À¹ö·¹ÀÌ µð·ºÅ丮ÀÔ´Ï´Ù. import lxc4utest1_overlay_lxc = lxc4u.create ( 'test1_overlay', base = 'test1', ¿À¹ö·¹ÀÌ = # containertest1_overlay_lxc.start ()ÀÌ ¿¹Á¦¸¦ ½ÃÀÛÇϽʽÿÀ. ¾ÆÁ÷ ±¸ÇöµÇÁö ¾Ê¾Ò½À´Ï´Ù. °ð! TEST1À̶ó´Â ÄÁÅ×À̳ʸ¦ ½ÃÀÛÇÕ´Ï´Ù. ÀÌ°ÍÀº LXC°¡ ½Ã½ºÅÛ¿¡¼ ¿Ã¹Ù¸£°Ô ±¸¼ºµÇ¾î ÀÖ´Ù°í °¡Á¤ÇÕ´Ï´Ù. lxc4u # ½ÃÀÛ containertest1_lxc = lxc4u.start ( 'test1') # stop containertest1_lxc.stop ( 'test1') # ¶Ç´Â lxc4u.stop ( 'test1') °¡´ÉÇÑ ÀÎÅÍÆäÀ̽º Test1À» »ç¿ëÇÏ¿© ephemeral ÄÁÅ×À̳ʸ¦ ±âº» : lxc4u # ½ÃÀÛ containertest1_ephemeral_lxc = lxc4u.start ( 'test1', ephemeral = true) # stop containertest1_ephemeral_lxc.stop () static ³×Æ®¿öÅ© ¼³Á¤ÀÌÀÖ´Â test1À» »ç¿ëÇÏ¿© ephemeral ÄÁÅ×ÀÌ³Ê ½ÃÀÛ : lxc4unetwork_settings = dict (ip = "10.0.3.5) ", gateway ="10.0.3.1 ", netmask ="255.255.255.0 ", network ="10.0.3.0 ",) # ½ÃÀÛ containertest1_ephemeral_lxc = lxc4u.start ( 'test1', ephemeral = true, static_network = network_settings) # stop containertest1_ephemeral_lxc .stop () ½ÃÀÛ ¸í·ÉÀ» »ç¿ëÇÏ¿© ephemeral ÄÁÅ×ÀÌ³Ê ½ÃÀÛ (ÄÁÅ×À̳ÊÀÇ °æ·Î¿¡¼ »ç¿ëÇÒ ¼ö ÀÖ¾î¾ß ÇÔ) : °¡Á® ¿À±â lxc4u # ½ÃÀÛ containertest1_ephemeral_lxc = lxc4u.start ( 'test1', epphemeral = true, startup_command = "/ usr / local / bin" / somecommand ") # ÁßÁö containertest1_ephemeral_lxc.stop. () Á¦Ç°ÀÇ È¨ÆäÀÌÁö
LXC4U. °ü·Ã ¼ÒÇÁÆ®¿þ¾î