Created
July 9, 2019 06:57
-
-
Save gowatana/615f7fc5b1db582245c37759ad1f075f to your computer and use it in GitHub Desktop.
Nutanix Calm 2048 Blueprint (CentOS7 Cloud Image)
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
{ | |
"api_version": "3.0", | |
"metadata": { | |
"creation_time": "1562653370655858", | |
"kind": "blueprint", | |
"last_update_time": "1562655036929458", | |
"name": "centos-2048", | |
"spec_version": 11 | |
}, | |
"spec": { | |
"description": "", | |
"name": "centos-2048", | |
"resources": { | |
"app_profile_list": [ | |
{ | |
"action_list": [], | |
"deployment_create_list": [ | |
{ | |
"action_list": [], | |
"depends_on_list": [], | |
"description": "", | |
"max_replicas": "1", | |
"min_replicas": "1", | |
"name": "d706cb5f_deployment", | |
"package_local_reference_list": [ | |
{ | |
"kind": "app_package", | |
"name": "2048_game" | |
} | |
], | |
"published_service_local_reference_list": [], | |
"substrate_local_reference": { | |
"kind": "app_substrate", | |
"name": "2048" | |
}, | |
"type": "GREENFIELD", | |
"variable_list": [] | |
} | |
], | |
"description": "", | |
"name": "Nutanix AHV", | |
"variable_list": [] | |
} | |
], | |
"client_attrs": { | |
"d706cb5f_deployment": { | |
"x": 95, | |
"y": 194.5 | |
} | |
}, | |
"credential_definition_list": [ | |
{ | |
"description": "", | |
"name": "DefaultUser", | |
"secret": { | |
"attrs": { | |
"is_secret_modified": false, | |
"secret_reference": {} | |
} | |
}, | |
"type": "PASSWORD", | |
"username": "centos" | |
} | |
], | |
"default_credential_local_reference": { | |
"kind": "app_credential", | |
"name": "DefaultUser" | |
}, | |
"package_definition_list": [ | |
{ | |
"action_list": [], | |
"description": "", | |
"name": "2048_game", | |
"options": { | |
"install_runbook": { | |
"description": "", | |
"main_task_local_reference": { | |
"kind": "app_task", | |
"name": "f7366ab3_dag" | |
}, | |
"message_list": [], | |
"name": "b0e93dd6_runbook", | |
"state": "ACTIVE", | |
"task_definition_list": [ | |
{ | |
"attrs": { | |
"command_line_args": "", | |
"exit_status": [], | |
"login_credential_local_reference": { | |
"kind": "app_credential", | |
"name": "DefaultUser" | |
}, | |
"script": "#!/bin/bash\nset -ex\n\nsudo yum -y install epel-release.noarch\nsudo yum -y install 2048-cli", | |
"script_type": "sh", | |
"type": "" | |
}, | |
"child_tasks_local_reference_list": [], | |
"description": "", | |
"message_list": [], | |
"name": "PackageInstallTask", | |
"retries": "0", | |
"state": "ACTIVE", | |
"target_any_local_reference": { | |
"kind": "app_service", | |
"name": "2048 Game" | |
}, | |
"timeout_secs": "0", | |
"type": "EXEC", | |
"variable_list": [] | |
}, | |
{ | |
"attrs": { | |
"edges": [], | |
"type": "" | |
}, | |
"child_tasks_local_reference_list": [ | |
{ | |
"kind": "app_task", | |
"name": "PackageInstallTask" | |
} | |
], | |
"description": "", | |
"message_list": [], | |
"name": "f7366ab3_dag", | |
"retries": "0", | |
"state": "ACTIVE", | |
"target_any_local_reference": { | |
"kind": "app_package", | |
"name": "2048_game" | |
}, | |
"timeout_secs": "0", | |
"type": "DAG", | |
"variable_list": [] | |
} | |
], | |
"variable_list": [] | |
}, | |
"type": "", | |
"uninstall_runbook": { | |
"description": "", | |
"main_task_local_reference": { | |
"kind": "app_task", | |
"name": "83c5e5e5_dag" | |
}, | |
"message_list": [], | |
"name": "701e2980_runbook", | |
"state": "ACTIVE", | |
"task_definition_list": [ | |
{ | |
"attrs": { | |
"edges": [], | |
"type": "" | |
}, | |
"child_tasks_local_reference_list": [], | |
"description": "", | |
"message_list": [], | |
"name": "83c5e5e5_dag", | |
"retries": "0", | |
"state": "ACTIVE", | |
"target_any_local_reference": { | |
"kind": "app_package", | |
"name": "2048_game" | |
}, | |
"timeout_secs": "0", | |
"type": "DAG", | |
"variable_list": [] | |
} | |
], | |
"variable_list": [] | |
} | |
}, | |
"service_local_reference_list": [ | |
{ | |
"kind": "app_service", | |
"name": "2048 Game" | |
} | |
], | |
"type": "DEB", | |
"variable_list": [], | |
"version": "" | |
} | |
], | |
"published_service_definition_list": [], | |
"service_definition_list": [ | |
{ | |
"action_list": [ | |
{ | |
"critical": false, | |
"description": "System action for creating an application", | |
"name": "action_create", | |
"runbook": { | |
"description": "", | |
"main_task_local_reference": { | |
"kind": "app_task", | |
"name": "3cb82da8_dag" | |
}, | |
"name": "0392dbbd_runbook", | |
"task_definition_list": [ | |
{ | |
"attrs": { | |
"edges": [], | |
"type": "" | |
}, | |
"child_tasks_local_reference_list": [], | |
"description": "", | |
"name": "3cb82da8_dag", | |
"retries": "0", | |
"target_any_local_reference": { | |
"kind": "app_service", | |
"name": "2048 Game" | |
}, | |
"timeout_secs": "0", | |
"type": "DAG", | |
"variable_list": [] | |
} | |
], | |
"variable_list": [] | |
}, | |
"type": "system" | |
}, | |
{ | |
"critical": false, | |
"description": "System action for deleting an application. Deletes created VMs as well", | |
"name": "action_delete", | |
"runbook": { | |
"description": "", | |
"main_task_local_reference": { | |
"kind": "app_task", | |
"name": "babbf0ab_dag" | |
}, | |
"name": "93f39394_runbook", | |
"task_definition_list": [ | |
{ | |
"attrs": { | |
"edges": [], | |
"type": "" | |
}, | |
"child_tasks_local_reference_list": [], | |
"description": "", | |
"name": "babbf0ab_dag", | |
"retries": "0", | |
"target_any_local_reference": { | |
"kind": "app_service", | |
"name": "2048 Game" | |
}, | |
"timeout_secs": "0", | |
"type": "DAG", | |
"variable_list": [] | |
} | |
], | |
"variable_list": [] | |
}, | |
"type": "system" | |
}, | |
{ | |
"critical": false, | |
"description": "System action for restarting an application", | |
"name": "action_restart", | |
"runbook": { | |
"description": "", | |
"main_task_local_reference": { | |
"kind": "app_task", | |
"name": "1c1cb0d9_dag" | |
}, | |
"name": "f123e892_runbook", | |
"task_definition_list": [ | |
{ | |
"attrs": { | |
"edges": [], | |
"type": "" | |
}, | |
"child_tasks_local_reference_list": [], | |
"description": "", | |
"name": "1c1cb0d9_dag", | |
"retries": "0", | |
"target_any_local_reference": { | |
"kind": "app_service", | |
"name": "2048 Game" | |
}, | |
"timeout_secs": "0", | |
"type": "DAG", | |
"variable_list": [] | |
} | |
], | |
"variable_list": [] | |
}, | |
"type": "system" | |
}, | |
{ | |
"critical": false, | |
"description": "System action for starting an application", | |
"name": "action_start", | |
"runbook": { | |
"description": "", | |
"main_task_local_reference": { | |
"kind": "app_task", | |
"name": "5feaf757_dag" | |
}, | |
"name": "efda8ba4_runbook", | |
"task_definition_list": [ | |
{ | |
"attrs": { | |
"edges": [], | |
"type": "" | |
}, | |
"child_tasks_local_reference_list": [], | |
"description": "", | |
"name": "5feaf757_dag", | |
"retries": "0", | |
"target_any_local_reference": { | |
"kind": "app_service", | |
"name": "2048 Game" | |
}, | |
"timeout_secs": "0", | |
"type": "DAG", | |
"variable_list": [] | |
} | |
], | |
"variable_list": [] | |
}, | |
"type": "system" | |
}, | |
{ | |
"critical": false, | |
"description": "System action for stopping an application", | |
"name": "action_stop", | |
"runbook": { | |
"description": "", | |
"main_task_local_reference": { | |
"kind": "app_task", | |
"name": "3168db73_dag" | |
}, | |
"name": "da09af0f_runbook", | |
"task_definition_list": [ | |
{ | |
"attrs": { | |
"edges": [], | |
"type": "" | |
}, | |
"child_tasks_local_reference_list": [], | |
"description": "", | |
"name": "3168db73_dag", | |
"retries": "0", | |
"target_any_local_reference": { | |
"kind": "app_service", | |
"name": "2048 Game" | |
}, | |
"timeout_secs": "0", | |
"type": "DAG", | |
"variable_list": [] | |
} | |
], | |
"variable_list": [] | |
}, | |
"type": "system" | |
} | |
], | |
"depends_on_list": [], | |
"description": "", | |
"name": "2048 Game", | |
"port_list": [], | |
"singleton": false, | |
"tier": "", | |
"variable_list": [] | |
} | |
], | |
"substrate_definition_list": [ | |
{ | |
"action_list": [], | |
"create_spec": { | |
"availability_zone_reference": null, | |
"backup_policy": null, | |
"categories": "", | |
"cluster_reference": null, | |
"name": "CENTOS-@@{calm_array_index}@@-@@{calm_time}@@", | |
"resources": { | |
"boot_config": { | |
"boot_device": { | |
"disk_address": { | |
"adapter_type": "SCSI", | |
"device_index": 0, | |
"type": "" | |
}, | |
"type": "" | |
}, | |
"mac_address": "", | |
"type": "" | |
}, | |
"disk_list": [ | |
{ | |
"data_source_reference": { | |
"kind": "image", | |
"name": "CentOS-7-x86_64-GenericCloud-1801-01", | |
"type": "", | |
"uuid": "99c50fb5-bd7a-41bc-a4e6-5656cb1216fc" | |
}, | |
"device_properties": { | |
"device_type": "DISK", | |
"disk_address": { | |
"adapter_type": "SCSI", | |
"device_index": 0, | |
"type": "" | |
}, | |
"type": "" | |
}, | |
"disk_size_mib": 0, | |
"type": "", | |
"volume_group_reference": null | |
} | |
], | |
"gpu_list": [], | |
"guest_customization": { | |
"cloud_init": { | |
"meta_data": "", | |
"type": "", | |
"user_data": "#cloud-config\nusers:\n- default\n\ndisable_root: true\nssh_pwauth: true\n\nsystem_info:\n default_user:\n name: @@{DefaultUser.username}@@\n plain_text_passwd: @@{DefaultUser.secret}@@\n lock_passwd: false" | |
}, | |
"sysprep": null, | |
"type": "" | |
}, | |
"guest_tools": null, | |
"hardware_clock_timezone": "", | |
"memory_size_mib": 2048, | |
"nic_list": [ | |
{ | |
"ip_endpoint_list": [], | |
"mac_address": "", | |
"network_function_chain_reference": null, | |
"network_function_nic_type": "INGRESS", | |
"nic_type": "NORMAL_NIC", | |
"subnet_reference": { | |
"kind": "subnet", | |
"name": "", | |
"type": "", | |
"uuid": "d254c8ba-4939-4418-b194-1beba155e7b7" | |
}, | |
"type": "" | |
} | |
], | |
"num_sockets": 2, | |
"num_vcpus_per_socket": 1, | |
"parent_reference": null, | |
"power_state": "ON", | |
"serial_port_list": [], | |
"type": "" | |
}, | |
"type": "" | |
}, | |
"description": "", | |
"editables": { | |
"create_spec": { | |
"resources": { | |
"disk_list": { | |
"0": { | |
"data_source_reference": true | |
} | |
}, | |
"nic_list": { | |
"0": { | |
"subnet_reference": true | |
} | |
}, | |
"serial_port_list": {} | |
} | |
} | |
}, | |
"name": "2048", | |
"os_type": "Linux", | |
"readiness_probe": { | |
"address": "@@{platform.status.resources.nic_list[0].ip_endpoint_list[0].ip}@@", | |
"connection_port": 22, | |
"connection_type": "SSH", | |
"delay_secs": "60", | |
"disable_readiness_probe": false, | |
"login_credential_local_reference": { | |
"kind": "app_credential", | |
"name": "DefaultUser" | |
} | |
}, | |
"type": "AHV_VM", | |
"variable_list": [] | |
} | |
], | |
"type": "USER" | |
} | |
}, | |
"status": {} | |
} |
アプリケーションが起動できたら、
・SSHでcentosユーザでログイン。
・2048 エンターキー(もしくは 2048 -cでカラーモード)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
アップロード後、ブループリントからアプリケーションを起動する前に・・・
・「認証情報」→「DefaultUser」でパスワードを入力してから「保存」しておく。
・CentOS7のGenericCloudイメージをイメージサービスに登録しておき、起動時に選択。https://cloud.centos.org/centos/7/images/
・起動時に IPAM有効のネットワークを選択する。