{"id":18675369,"url":"https://github.com/manuparra/clustering-openstack","last_synced_at":"2025-11-07T05:30:39.135Z","repository":{"id":79159168,"uuid":"121774049","full_name":"manuparra/clustering-openstack","owner":"manuparra","description":"Make a dynamic and customizable cluster with OpenStack","archived":false,"fork":false,"pushed_at":"2018-02-18T23:47:22.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T20:33:46.252Z","etag":null,"topics":["cluster","deployment","hadoop","openstack","openstack-command","script","slave-nodes","spark"],"latest_commit_sha":null,"homepage":"http://dicits.ugr.es","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manuparra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-16T16:36:23.000Z","updated_at":"2018-02-18T08:56:33.000Z","dependencies_parsed_at":"2023-05-18T14:01:53.373Z","dependency_job_id":null,"html_url":"https://github.com/manuparra/clustering-openstack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuparra%2Fclustering-openstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuparra%2Fclustering-openstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuparra%2Fclustering-openstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuparra%2Fclustering-openstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manuparra","download_url":"https://codeload.github.com/manuparra/clustering-openstack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239520176,"owners_count":19652641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","deployment","hadoop","openstack","openstack-command","script","slave-nodes","spark"],"created_at":"2024-11-07T09:24:39.000Z","updated_at":"2025-11-07T05:30:39.096Z","avatar_url":"https://github.com/manuparra.png","language":null,"readme":"# clustering-openstack\n\n### Project Description\nIn this project we pretend to describe the mecanism, used to deploy a cluster on Spark. We gonna describe the \n\n### Table of Content\n1. Introduction\n2. OpenStack commands used in this project \n\t* [OpenStack command line](#OpenStack-command-line)\n\t* [Create instances](#Create-instances)\n\t* [List the flavors](#How-to-show-the-flavors)\n\t* [List the availabel images](#List-the-availabel-images)\n\t* [List the availabel networks](#List-the-availabel-networks)\n\t* [List the created security groups](#List-the-created-security-groups)\n\n3. Scripting\n4. Spark configuration\n\n\n#### Create instances\n\nTo launch an instance, we must at least specify the flavor, image name, network, security group, key, and instance name.\n\nWe will work with the ``Name`` or ``ID`` of the elements that we will show:\n\n---------------------\n\n#### List the flavors\n\n```\nopenstack flavor list \n```\n![flavor list](https://user-images.githubusercontent.com/19154337/36341891-7f3521c8-13f5-11e8-87c6-442e428046e9.png)\n\nA flavor specifies a virtual resource allocation profile which includes processor, memory, and storage.\n\n------------------------------\n\n#### List the availabel images\n```\nopenstack image list\n```\nScreenshot: List of images\n![image list](https://user-images.githubusercontent.com/19154337/36341806-15b0ee18-13f4-11e8-9381-b9c3e938cec1.png)\n\nWe will use CentOS7 or Fedora images\n\n--------------------------------\n\n#### List the availabel networks\n```\nopenstack network list\n```\n\n![network list](https://user-images.githubusercontent.com/19154337/36341907-ba4099b4-13f5-11e8-9343-19c9f32bb0ee.png)\n\n\n#### List the created security groups\n```\nopenstack security group listlaunch a cluster of master and slaves cirtual machines on openstack command line\n```\nScreenshot: Security groups\n![scurity group](https://user-images.githubusercontent.com/19154337/36341856-efd324e4-13f4-11e8-8e61-14c60708e302.png)\n\n------------------------\n\n#### Create the instance\n\nExample:\n\n```\nopenstack server create --flavor XXXXX --image XXXXXX  --nic net-id=XXXXXXX --security-group XXXXXX  --key-name XXXXXXX provider-instance\n```\n\nWith our data:\n\n```\nopenstack server create --flavor 3 --image CentOS7  --nic net-id=55c3bd97-fef8-47cf-bde7-a7f6c22f2d2c --security-group default --key-name rashadkey provider-instance\n```\n![created instance](https://user-images.githubusercontent.com/19154337/36346610-ec53e78e-1441-11e8-8964-85921835c1b4.png)\n\n--------------------------\n\n### IP Floating\n* #### List of Floating IP\n```\nopenstack floating ip list\n```\n![list of floating ip](https://user-images.githubusercontent.com/19154337/36352310-3cba6cf0-14b7-11e8-8b1e-b9021ffe59cc.png)\n\nFor each floating IP address that is allocated to your project, the command outputs the ID of the floating IP \t\taddress, the actual floating IP address, the private IP address of the instance the floating IP address is \t\tassociated with, and the ID for the port that the floating IP address is connected to.\n\n* #### Disassociate floating IP of an instance:\nFirstly, let  us see the availabel instances \"servers\":\n![server list](https://user-images.githubusercontent.com/19154337/36357208-05cf519e-14fb-11e8-8854-3bdf3989fc7d.png)\n\nLet's disassociate the floating IP of the instance with the name, CirrOS-cloud-init. We can see that its floating IP is 192.168.10.53. To disassociate it, we do the following:\n```\nopenstack server remove floating ip CirrOS-cloud-init 192.168.10.53\n```\nScreenshot: Disassociate Floating IP:\n![disassociate floating ip](https://user-images.githubusercontent.com/19154337/36357374-6f230e18-14fd-11e8-86ea-c09eae8d57b8.png)\n\nWe can see how this floating ip is no longer associated to the specified instance.\n\n* #### Create floating IP \n\nTo associate a floating IP, we can use an exisiting one or create a new one and assign it to our project, before assign it to an instance.\n```\nopenstack floating ip create \u003cnetwork\u003e\n```\n![create ip floating](https://user-images.githubusercontent.com/19154337/36357950-31cc8ca2-1506-11e8-85a3-42020cf80633.png)\n\nWe can see that network in our example, is external.\n\n* #### Associate floating IP to an instance\n```\nopenstack server add floating ip CirrOS-cloud-init 192.168.10.68\n```\n![associated floating ip](https://user-images.githubusercontent.com/19154337/36358285-81577484-150c-11e8-8500-aac2955ce114.png)\nNow we can see how the instance called, CirrOS-cloud-init, has an associated floating IP, and it's, 192.168.10.68; which we created in previous step.\n\n---------------------------------\n\n### Assign IP (internal)....\nHow to assing a specific Internal IP (10.....) to the instance.\n\n## Script\nThe script will allow us to create an instance environment with specific configuration parameters.\n\nInput Parameters:\n\n- Options: {start, status and delete} \n\t- Start: Create a new cluster with a name;\n\t- Delete: Remove all instances assiciated to the cluster;\n\t- Status: check the status of the cluster.\n\t\n- Name of the cluster (identifier of the cluster)\n- Number of master nodes\n- Number of slave nodes\n- IP master node (floating)\n- IP slaves nodes (internal)\n- Flavor of the set of instances\n- Network Name for the instances\n- Security group\n- Key Name for the instances\n- Image for the instances\n\nParameter Code:\n\n```\nimport sys\nimport random,sys,os,math\nimport argparse\nimport json\n\n\ndef main():\n\n\tparser = argparse.ArgumentParser(description='ClusterOpenStack')\n\n\tparser.add_argument('-op','--operation', help='Operation of the cluster', required=True)\n\tparser.add_argument('-name','--name', help='Name of the cluster', required=True)\n\tparser.add_argument('-nm','--nummasters', help='Num Masters', required=True)\n\tparser.add_argument('-ns','--numslaves', help='Num Slaves', required=True)\n\tparser.add_argument('-ipm','--ipmasters', help='IPs of Masters', required=True)\n\tparser.add_argument('-ips','--ipslaves', help='IPs of Slaves', required=True)\n\tparser.add_argument('-fl','--flavor', help='Flavor of the instances', required=True)\n\tparser.add_argument('-n','--network', help='Network name or ID', required=True)\n\tparser.add_argument('-s','--security', help='Security name', required=True)\n\tparser.add_argument('-i','--image', help='Image name', required=True)\n\t\n\n\targs = vars(parser.parse_args())\n\n\tprint args.operation\n\tprint args.name\n\n\nmain()\n\n```\n\n\n\n\n#### Spark configuration.\n\n#### Bibliograpgy\n- Launch instance provider\n\t* https://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-provider.html\n- Floating IP\n\t* https://docs.openstack.org/python-openstackclient/pike/cli/command-objects/floating-ip.html\n\t* https://help.dreamhost.com/hc/en-us/articles/215912768-Managing-floating-IP-addresses-using-the-OpenStack-CLI\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuparra%2Fclustering-openstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanuparra%2Fclustering-openstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuparra%2Fclustering-openstack/lists"}