雲 Ikoula の互換性のあるモデルを作成する方法
it:Come creare un modello compatibile Cloud Ikoula
pt:Como criar um modelo compatível nuvem Ikoula
es:Cómo crear un modelo compatible nube Ikoula
en:How create a compatible model Cloud Ikoula
ru:Как создать совместимый модель облачных Ikoula
ar:كيفية إنشاء نموذج متوافق مع
zh:如何创建一个兼容模型云 Ikoula
fr:Comment creer un modele compatible Cloud Ikoula
这篇文章是从由软件进行自动翻译。你可以看到这篇文章的源代码
次の手順は、最初からインストールからクラウド Ikoula と互換性のあるモデルを作成する方法をについて説明します (iso から ).
例では、GNU のイメージを作ります /Linux フェドーラ 22.
インターフェイスにログオン 雲 Ikoula :
クリックして "モデル " 左側のメニューで :
ビューを選択 "ISO " :
ボタンをクリックして "ISO を保存 " :
フィールドに入力し、 :
1: あなたのイメージの名前を入力してください
2: あなたのイメージの説明を入力
3: 入力 /HTTP url を貼り付けて (非 https ) 完全な iso ファイル
4: あなたのイメージが利用可能になるクラウド Ikoula 領域を選択
5: あなたの iso から起動できるようにインスタンスの場合、このチェック ボックスをオン
6: 他では 1 つの種類の選択一覧から選択、システムおよびそれのバージョンがある場合、あなたの ISO システムの種類を示す "他の xxx " 最も適しています。私たちの場合は、Fedora 22 したがってを選択しているリストでは利用できません "他の Linux (64-ビット )".
7: 一度作成したあなたの ISO をダウンロードすることができますしたい場合このケースをチェック
あなたの ISO が登録されると、待ち状態になるまで "ローン : はい " :
クリックして "インスタンス " 左側のメニューで :
ボタンをクリックして "インスタンスを追加 " :
インスタンスの展開地を選択ください :
ISO を選択しをクリックして "次 "
タブをクリックして "私の iso イメージ " 作成する iso を選択 :
お好みの計算のための提案を選択し、をクリックして "次 "
ディスクのサイズを選択するカーソルをスライドした (GB ) インスタンスにするなり、あなたの将来のモデルやサイズを入力 (GB ) 手動でフィールドにし、ボタン "エントリ " 上部の説明に表示されます、選択したキーボード :
クリックして "次 "
インスタンスを配置するの古典的な段階を継続 (親和性、ネットワーク、インスタンス名 ) "次 " 検証し、クリックするたびに "VM を起動 "
インスタンスを展開するの名前をクリックして、 ([インスタンス] メニュー ) :
ボタンをクリックして "コンソールを参照してください " (これの詳細にインスタンスに接続されている ISO イメージを参照してください ) :
新しいポップアップ ウィンドウが開きます (ブロックすることがないそれ雲 Ikoula インターフェイス ポップアップ ケース チェックできない場合 ).このウィンドウは、実際に web GUI コンソール型 VNC /KVM (écran/clavier/souris) インスタンスのディスクにシステムをインストールすることができるあなたのインスタンス :
分割し、構成を使用してシステムのインストールを続行 (求められた場合、SSH パッケージをインストール )、ただし、キーボードが qwerty 配列の型は (注意このためパスワードの定義に ).
At を要求時インストールの最後の再起動をクリックして ISO をデタッチするのには、インスタンスを停止
インスタンスを停止すると、インスタンスをクリックし、ボタンの名前をクリックして "ISO イメージを分離 " :
一度あなたのインスタンスからデタッチ iso、再び起動できますだけディスクにインストールされたシステムで開始する (ROOTDISK ) 後者。
ボタンをクリックして "コンソールを参照してください " あなたの起動システムを参照して :
SSH を使用してインスタンスに接続 (作成が必要ファイアウォール規則とポートのリダイレクト インスタンス ゾーンである場合 /高度なネットワーク またはそれは基本的なゾーンで、インスタンス システムに iptables のルールがない場合は、セキュリティ グループの受信規則 ) クラウド Ikoula と互換性のあるシステムの構成を完了します。
依存で、LVM パーティションの仮想コンテキストについて (ルートとスワップの論理ボリューム ) 簡単にサイズ変更または仮想ディスクを追加する場合、パーティションのサイズを変更するために :
[root@Fedora22x64 ~]# fdisk -l
Disque /dev/xvda : 50 GiB, 53687091200 octets, 104857600 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0xa1c87ad9
Périphérique Amorçage Début Fin Secteurs Taille Id Type
/dev/xvda1 2048 4095 2048 1M 83 Linux
/dev/xvda2 * 4096 1955839 1951744 953M 83 Linux
/dev/xvda3 1955840 104857599 102901760 49,1G 8e LVM Linux
Disque /dev/mapper/vg01-root : 48,1 GiB, 51610910720 octets, 100802560 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Disque /dev/mapper/vg01-swap : 1 GiB, 1073741824 octets, 2097152 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
[root@Fedora22x64 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/xvda3 vg01 lvm2 a-- 49,07g 0
[root@Fedora22x64 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
vg01 1 2 0 wz--n- 49,07g 0
[root@Fedora22x64 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root vg01 -wi-ao---- 48,07g
swap vg01 -wi-ao---- 1,00g
必要に応じてシステムを更新 (パッケージ マネージャーに適応する ) :
[root@Fedora22x64 ~]# dnf upgrade
設定コマンドを実行する使用ことができる最小のパッケージをインストールしてください "UserData " 展開中に 例えば テンプレート : Vim、rsync、カール、wget、雲の init、人形、率 :
[root@Fedora22x64 system]# dnf list installed vim-enhanced rsync curl wget cloud-init puppet facter
Vérification de l'expiration des métadonnées effectuée il y a 0:30:24 sur Tue Oct 6 08:49:42 2015.
Paquets installés
cloud-init.x86_64 0.7.6-3.fc22 @System
curl.x86_64 7.40.0-7.fc22 @System
facter.x86_64 2.4.1-1.fc22 @System
puppet.noarch 4.1.0-5.fc22 @System
rsync.x86_64 3.1.1-6.fc22 @System
vim-enhanced.x86_64 2:7.4.827-1.fc22 @System
wget.x86_64 1.16.3-1.fc22 @System
- 行を追加 "datasource_list : ['CloudStack']" 構成ファイルの先頭に /etc/cloud/cloud.cfg (上記のように雲の init をインストールした場合 ) :
[root@fedora22 ~]# head -n1 /etc/cloud/cloud.cfg
datasource_list: ['CloudStack']
私たちのミラーの Xen のツールを含むアーカイブを取得 :
[root@Fedora22x64 ~]# wget http://mirror03.ikoula.com/pub/citrix/xentools/linux65.zip
--2015-10-05 17:28:10-- http://mirror03.ikoula.com/pub/citrix/xentools/linux65.zip
Résolution de mirror03.ikoula.com (mirror03.ikoula.com)… 80.93.XX.XX, 2a00:c70:1:80:93:XX:XX:1
Connexion à mirror03.ikoula.com (mirror03.ikoula.com)|80.93.XX.XX|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 60474580 (58M) [application/zip]
Sauvegarde en : « linux65.zip »
linux65.zip 100%[===================================================================================================>] 57,67M 1,14MB/s ds 50s
2015-10-05 17:29:00 (1,14 MB/s) — « linux65.zip » sauvegardé [60474580/60474580]
現在のディレクトリにアンパック (必要がありますインストールする解凍 ) :
[root@Fedora22x64 ~]# unzip linux65.zip
Archive: linux65.zip
creating: linux65/
creating: linux65/rhel4x/
inflating: linux65/rhel4x/kernel-xenU-2.6.9-103.EL.xs6.5.0.68.i686.rpm
inflating: linux65/rhel4x/mkinitrd-4.2.1.10-1.1.i386.rpm
inflating: linux65/rhel4x/versions
inflating: linux65/xe-linux-distribution
inflating: linux65/xe-guest-utilities_6.5.0-1400_amd64.deb
inflating: linux65/xe-guest-utilities_6.5.0-1400_i386.deb
inflating: linux65/xe-guest-utilities-6.5.0-1400.i386.rpm
inflating: linux65/xe-guest-utilities-6.5.0-1400.x86_64.rpm
inflating: linux65/xe-guest-utilities-xenstore-6.5.0-1400.i386.rpm
inflating: linux65/install.sh
inflating: linux65/xe-guest-utilities-xenstore-6.5.0-1400.x86_64.rpm
creating: linux65/debian-lenny/
inflating: linux65/debian-lenny/linux-image-2.6.32-5-amd64_2.6.32-43.xs6.5.0.299_amd64.deb
inflating: linux65/debian-lenny/linux-image-2.6-xen_2.6.32+0.xs299_i386.deb
inflating: linux65/debian-lenny/linux-image-2.6.32-5-686-bigmem_2.6.32-43.xs6.5.0.299_i386.deb
inflating: linux65/debian-lenny/linux-image-2.6-xen_2.6.32+0.xs299_amd64.deb
inflating: linux65/debian-lenny/versions
inflating: linux65/versions.rpm
inflating: linux65/README.txt
inflating: linux65/versions.deb
[root@Fedora22x64 ~]#
Xen のツールのインストールを実行 :
[root@Fedora22x64 ~]# ./linux65/install.sh
Detected `Fedora release 22 (Twenty Two)' (fedora version 22).
The following changes will be made to this Virtual Machine:
* update arp_notify sysctl.conf.
* packages to be installed/upgraded:
- xe-guest-utilities-6.5.0-1400.x86_64.rpm
- xe-guest-utilities-xenstore-6.5.0-1400.x86_64.rpm
Continue? [y/n] y
attention : Génération d'index manquant(s) 4, merci d'attendre...
Préparation... ################################# [100%]
Mise à jour / installation...
1:xe-guest-utilities-xenstore-6.5.0################################# [ 50%]
2:xe-guest-utilities-6.5.0-1400 ################################# [100%]
You should now reboot this Virtual Machine.
このプロンプトが表示、インスタンスを再起動 :
[root@Fedora22x64 ~]# reboot
Vérification :
[root@Fedora22x64 ~]# systemctl status xe-linux-distribution.service
● xe-linux-distribution.service - LSB: XenServer Virtual Machine daemon providing host integration services
Loaded: loaded (/etc/rc.d/init.d/xe-linux-distribution)
Active: active (running) since lun. 2015-10-05 19:11:06 CEST; 13h ago
Docs: man:systemd-sysv-generator(8)
Process: 586 ExecStart=/etc/rc.d/init.d/xe-linux-distribution start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/xe-linux-distribution.service
├─ 631 /bin/bash /usr/sbin/xe-daemon -p /var/run/xe-daemon.pid
└─2725 sleep 60
oct. 05 19:11:05 Fedora22x64 systemd[1]: Starting LSB: XenServer Virtual Machine daemon providing host integration services...
oct. 05 19:11:06 Fedora22x64 systemd[1]: Started LSB: XenServer Virtual Machine daemon providing host integration services.
oct. 05 19:11:06 Fedora22x64 xe-linux-distribution[586]: Mounting xenfs on /proc/xen: [ OK ]
oct. 05 19:11:06 Fedora22x64 xe-linux-distribution[586]: Detecting Linux distribution version: [ OK ]
oct. 05 19:11:06 Fedora22x64 xe-linux-distribution[586]: Starting xe daemon: [ OK ]
インストール ファイルを削除することができます :
[root@Fedora22x64 ~]# rm -rf linux65*
[root@Fedora22x64 ~]#
次の行を追加 /etc/sysctl.conf (API を無効にします 6 いくつかの最適化を適用し、):
#Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
#Disable Swap
vm.swappiness = 0
#Improve memory management
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
#No overcommitment of available memory
vm.overcommit_ratio = 0
vm.overcommit_memory = 0
#Set maximum amount of memory allocated to shm to 256MB
kernel.shmmax = 268435456
kernel.shmall = 268435456
#Keep at least 64MB of free RAM space available
vm.min_free_kbytes = 65535
コマンドを実行し、 "sysctl -p" :
[root@Fedora22x64 init.d]# sysctl -p
net.ipv4.conf.all.arp_notify = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
vm.swappiness = 0
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
vm.overcommit_ratio = 0
vm.overcommit_memory = 0
kernel.shmmax = 268435456
kernel.shmall = 268435456
vm.min_free_kbytes = 65535
それはからそれを渡す SELinux ポリシーを変更 "強制 " à "寛容 " :
[root@Fedora22x64 ~]# sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/sysconfig/selinux
[root@Fedora22x64 ~]# setenforce Permissive
[root@Fedora22x64 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 29
お使いのシステムに起源のファイアウォールのルールがある場合 stoppper をしてくださいし、私たちの事例で、それを無効にする :
[root@Fedora22x64 ~]# systemctl stop firewalld.service
[root@Fedora22x64 ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
それは責任のより多くの規則があることを確認します :
[root@Fedora22x64 ~]# iptables -vnL
Chain INPUT (policy ACCEPT 34 packets, 2240 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 32 packets, 3568 bytes)
pkts bytes target prot opt in out source destination
我々 は今、クラウド ゲスト スクリプトをインストール パスワード、ホスト名、userdata の SSH キーの変更の機能の基には :
- まず、当社のミラーにスクリプトを含むアーカイブを取得 (Fedora を編集 22 centos で 7、debian 8 または ubuntu 1404 次の url ) :
[root@Fedora22x64 ~]# wget http://mirror02.ikoula.com/priv/citrix/scripts/systemd/fedora22/cloud-set-guest-scripts.tar.gz
--2015-10-06 09:57:13-- http://mirror02.ikoula.com/priv/citrix/scripts/systemd/fedora22/cloud-set-guest-scripts.tar.gz
Résolution de mirror02.ikoula.com (mirror02.ikoula.com)… 80.93.XX.XX, 2a00:c70:1:80:93:XX:XX:1
Connexion à mirror02.ikoula.com (mirror02.ikoula.com)|80.93.XX.XX|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 2965 (2,9K) [application/x-gzip]
Sauvegarde en : « cloud-set-guest-scripts.tar.gz »
cloud-set-guest-scripts.tar.gz 100%[===================================================================================================>] 2,90K --.-KB/s ds 0s
2015-10-06 09:57:13 (279 MB/s) — « cloud-set-guest-scripts.tar.gz » sauvegardé [2965/2965]
- 内容を抽出 :
[root@Fedora22x64 ~]# tar xvzf cloud-set-guest-scripts.tar.gz
cloud-set-guest-hostname
cloud-set-guest-hostname.service
cloud-set-guest-password
cloud-set-guest-password.service
cloud-set-guest-sshkey
cloud-set-guest-sshkey.service
cloud-set-guest-userdata
cloud-set-guest-userdata.service
readme.txt
- 移動ファイル .service /lib/systemd/system/ :
[root@Fedora22x64 ~]# mv cloud-set-guest-*.service /lib/systemd/system/
[root@Fedora22x64 ~]#
- その他のファイルを移動 /etc/init.d/
[root@Fedora22x64 ~]# rm -f cloud-set-guest-scripts.tar.gz
[root@Fedora22x64 ~]# mv cloud-set-guest-* /etc/init.d/
[root@Fedora22x64 ~]#
- それにより当社サービス ユニット :
[root@Fedora22x64 ~]# systemctl enable cloud-set-guest-hostname.service
Created symlink from /etc/systemd/system/multi-user.target.wants/cloud-set-guest-hostname.service to /usr/lib/systemd/system/cloud-set-guest-hostname.service.
[root@Fedora22x64 ~]# systemctl enable cloud-set-guest-password.service
Created symlink from /etc/systemd/system/multi-user.target.wants/cloud-set-guest-password.service to /usr/lib/systemd/system/cloud-set-guest-password.service.
[root@Fedora22x64 ~]# systemctl enable cloud-set-guest-sshkey.service
Created symlink from /etc/systemd/system/multi-user.target.wants/cloud-set-guest-sshkey.service to /usr/lib/systemd/system/cloud-set-guest-sshkey.service.
[root@Fedora22x64 ~]# systemctl enable cloud-set-guest-userdata.service
Created symlink from /etc/systemd/system/multi-user.target.wants/cloud-set-guest-userdata.service to /usr/lib/systemd/system/cloud-set-guest-userdata.service.
[root@Fedora22x64 ~]# systemctl -l | grep cloud-set
cloud-set-guest-hostname.service loaded active exited CloudStack Set Guest Hostname
cloud-set-guest-password.service loaded active exited CloudStack Set Guest Password Reset
cloud-set-guest-sshkey.service loaded active exited CloudStack Set Guest Ssh Key
cloud-set-guest-userdata.service loaded active exited CloudStack Set Guest Userdata
- 我々 は、DHCP リース ファイルをパージ (ニーズに合わせて、ファイルのパスと名前 ) :
[root@fedora22 ~]# > /var/lib/dhclient/dhclient.leases
- パージ マスター記録ファイルとコマンド履歴 :
[root@Fedora22x64 ~]# list=`find /var/log/ -type f`
[root@Fedora22x64 ~]# for arg in $list ; do > $arg ; done
[root@Fedora22x64 ~]# list=`find /var/log/ -name "*.gz"`
[root@Fedora22x64 ~]# for arg in $list ; do /bin/rm $arg ; done
[root@Fedora22x64 ~]# > .bash_history
[root@Fedora22x64 ~]# history -c && shutdown -h now && exit
- それは終了インスタンスのモデルを作成 :
クラウド Ikoula インターフェイス上行く "インスタンス " インスタンスの名前をクリックして
クリックして "ボリュームを参照してください " :
ルート ボリュームの名前をクリックして :
ボタンをクリックして "テンプレートを作成する " :
名前と説明、モデルにする同じ種類のインスタンスよりも骨のチェックを選択 "パスワードが有効な " et "動的なサイズ変更 " (それぞれクラウド セット ゲスト パスワード スクリプトを設定して、xentools をインストール場合 ) :
テンプレートの作成を完了したら :
あなたはそれを見つけることができる "モデル " :
テンプレートとタブをクリックの名前 "地域 " その状態が準備ができていることを確認する (ローン : はい ) :
今クラウド Ikoula 互換性のあるモデルと新しいインスタンスを展開することができます (タブでモデルを選択する必要があります "マイ テンプレート " インスタンスの展開ウィザード) :
<comments />
<comments />
<comments />
<comments />
<comments />
コメントの自動更新を有効化