Last active
June 9, 2017 10:53
-
-
Save taru0216/187f50f9c85bf239dace0cd8097d43ec to your computer and use it in GitHub Desktop.
Retty流『2200万ユーザを支える機械学習基盤』の作り方 ref: http://qiita.com/taru0216/items/dda1f9f11397f811e98a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
juju add-unit -n48 akiba |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --privileged -it --rm 192.168.0.1/retty-runtime-anaconda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru /usr/share/virt-manager/virtinst/devicedisk.py /usr/local/share/virt-manager/virtinst/devicedisk.py | |
--- /usr/share/virt-manager/virtinst/devicedisk.py 2015-11-30 20:47:47.000000000 +0000 | |
+++ /usr/local/share/virt-manager/virtinst/devicedisk.py 2016-11-09 05:12:36.513295726 +0000 | |
@@ -464,6 +464,7 @@ | |
"source_volume", "source_pool", "source_protocol", "source_name", | |
"source_host_name", "source_host_port", | |
"source_host_transport", "source_host_socket", | |
+ "auth_username", "auth_secret_type", "auth_secret_uuid", | |
"target", "bus", | |
] | |
@@ -744,6 +745,9 @@ | |
seclabel = XMLChildProperty(Seclabel, relative_xpath="./source") | |
+ auth_username = XMLProperty("./auth/@username") | |
+ auth_secret_type = XMLProperty("./auth/secret/@type") | |
+ auth_secret_uuid = XMLProperty("./auth/secret/@uuid") | |
################################# | |
# Validation assistance methods # | |
@@ -867,6 +871,12 @@ | |
self._change_backend(None, vol_object, parent_pool) | |
def set_defaults(self, guest): | |
+ pool = self._storage_backend.get_parent_pool_xml() | |
+ if pool.source_auth_type != "": | |
+ self.auth_username = pool.source_auth_username | |
+ self.auth_secret_type = pool.source_auth_type | |
+ self.auth_secret_uuid = pool.source_auth_secret_uuid | |
+ | |
if self.is_cdrom(): | |
self.read_only = True | |
diff -ru /usr/share/virt-manager/virtinst/storage.py /usr/local/share/virt-manager/virtinst/storage.py | |
--- /usr/share/virt-manager/virtinst/storage.py 2015-12-24 16:30:15.000000000 +0000 | |
+++ /usr/local/share/virt-manager/virtinst/storage.py 2016-11-05 04:29:29.270748502 +0000 | |
@@ -380,7 +380,10 @@ | |
"capacity", "allocation", "available", | |
"format", "hosts", | |
"_source_dir", "_source_adapter", "_source_device", | |
- "source_name", "target_path", | |
+ "source_name", | |
+ "source_auth_type", "source_auth_username", | |
+ "source_auth_secret_uuid", | |
+ "target_path", | |
"permissions"] | |
@@ -406,6 +409,10 @@ | |
default_cb=_default_source_name, | |
doc=_("Name of the Volume Group")) | |
+ source_auth_type = XMLProperty("./source/auth/@type") | |
+ source_auth_username = XMLProperty("./source/auth/@username") | |
+ source_auth_secret_uuid = XMLProperty("./source/auth/secret/@uuid") | |
+ | |
target_path = XMLProperty("./target/path", | |
default_cb=_get_default_target_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --privileged -it --rm 192.168.0.1/retty-runtime-anaconda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru /usr/share/virt-manager/virtinst/devicedisk.py /usr/local/share/virt-manager/virtinst/devicedisk.py | |
--- /usr/share/virt-manager/virtinst/devicedisk.py 2015-11-30 20:47:47.000000000 +0000 | |
+++ /usr/local/share/virt-manager/virtinst/devicedisk.py 2016-11-09 05:12:36.513295726 +0000 | |
@@ -464,6 +464,7 @@ | |
"source_volume", "source_pool", "source_protocol", "source_name", | |
"source_host_name", "source_host_port", | |
"source_host_transport", "source_host_socket", | |
+ "auth_username", "auth_secret_type", "auth_secret_uuid", | |
"target", "bus", | |
] | |
@@ -744,6 +745,9 @@ | |
seclabel = XMLChildProperty(Seclabel, relative_xpath="./source") | |
+ auth_username = XMLProperty("./auth/@username") | |
+ auth_secret_type = XMLProperty("./auth/secret/@type") | |
+ auth_secret_uuid = XMLProperty("./auth/secret/@uuid") | |
################################# | |
# Validation assistance methods # | |
@@ -867,6 +871,12 @@ | |
self._change_backend(None, vol_object, parent_pool) | |
def set_defaults(self, guest): | |
+ pool = self._storage_backend.get_parent_pool_xml() | |
+ if pool.source_auth_type != "": | |
+ self.auth_username = pool.source_auth_username | |
+ self.auth_secret_type = pool.source_auth_type | |
+ self.auth_secret_uuid = pool.source_auth_secret_uuid | |
+ | |
if self.is_cdrom(): | |
self.read_only = True | |
diff -ru /usr/share/virt-manager/virtinst/storage.py /usr/local/share/virt-manager/virtinst/storage.py | |
--- /usr/share/virt-manager/virtinst/storage.py 2015-12-24 16:30:15.000000000 +0000 | |
+++ /usr/local/share/virt-manager/virtinst/storage.py 2016-11-05 04:29:29.270748502 +0000 | |
@@ -380,7 +380,10 @@ | |
"capacity", "allocation", "available", | |
"format", "hosts", | |
"_source_dir", "_source_adapter", "_source_device", | |
- "source_name", "target_path", | |
+ "source_name", | |
+ "source_auth_type", "source_auth_username", | |
+ "source_auth_secret_uuid", | |
+ "target_path", | |
"permissions"] | |
@@ -406,6 +409,10 @@ | |
default_cb=_default_source_name, | |
doc=_("Name of the Volume Group")) | |
+ source_auth_type = XMLProperty("./source/auth/@type") | |
+ source_auth_username = XMLProperty("./source/auth/@username") | |
+ source_auth_secret_uuid = XMLProperty("./source/auth/secret/@uuid") | |
+ | |
target_path = XMLProperty("./target/path", | |
default_cb=_get_default_target_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virt-install --name=hoge --vcpus=4 --memory=4096 --disk rbd:hoge/fuga ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016/12/25 12:41: 画像が見えなくなっていた問題を修正しました。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment