{"id":23679823,"url":"https://github.com/lithops-cloud/lithopscloud","last_synced_at":"2025-09-02T09:31:13.592Z","repository":{"id":42072461,"uuid":"397172743","full_name":"lithops-cloud/lithopscloud","owner":"lithops-cloud","description":"Automatically generates configuration files for Lithops","archived":false,"fork":false,"pushed_at":"2023-01-24T09:25:57.000Z","size":253,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-29T13:19:37.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lithops-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-17T08:33:48.000Z","updated_at":"2022-01-03T19:27:19.000Z","dependencies_parsed_at":"2023-02-13T19:40:22.602Z","dependency_job_id":null,"html_url":"https://github.com/lithops-cloud/lithopscloud","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/lithops-cloud%2Flithopscloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithops-cloud%2Flithopscloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithops-cloud%2Flithopscloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithops-cloud%2Flithopscloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lithops-cloud","download_url":"https://codeload.github.com/lithops-cloud/lithopscloud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231768705,"owners_count":18423791,"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":[],"created_at":"2024-12-29T17:55:49.692Z","updated_at":"2024-12-29T17:55:50.341Z","avatar_url":"https://github.com/lithops-cloud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tool to generate Lithops configuration file\n\nLithopscloud is a CLI tool that greatly simplifies user experience by generating Lithops and Ray configuration files.\n\n## Setup\n\nThe tool been mostly tested with Ubuntu 18.04/20.04, but should work with most Linux systems\nRequirements: `ssh-keygen` utility installed:\n```\nsudo apt install openssh-client\n```\n\nInstall `lithopscloud` from pip repository\n\n```\npip install lithopscloud\n```\n\n## Usage\nUse the configuration tool as follows\n\n```\nlithopscloud [--iam-api-key IAM_API_KEY] [-i INPUT_FILE] [-o OUTPUT_PATH] [--verify_config CONFIG_FILE_PATH] [--version] [--backend backend] [--defaults] \n```\nGet a short description of the available flags via ```lithopscloud --help```\n\n\u003cbr/\u003e\n\n#### Flags Detailed Description\n\n\u003c!--- \u003cimg width=125/\u003e is used in the following table to create spacing ---\u003e\n |\u003cspan style=\"color:orange\"\u003eKey|\u003cspan style=\"color:orange\"\u003eDefault|\u003cspan style=\"color:orange\"\u003eMandatory|\u003cspan style=\"color:orange\"\u003eAdditional info|\n |---|---|---|---|\n | iam-api-key   | |yes|IBM Cloud API key. To generate a new API Key, adhere to the following [guide](https://www.ibm.com/docs/en/spectrumvirtualizecl/8.1.3?topic=installing-creating-api-key)\n | input-file    |\u003ccompute_backend\u003e/defaults.py| no | Existing config file to be used as a template in the configuration process |\n | output-path   |A randomly generated path to a randomly named yaml file | no |A custom location the config file will be written to |\n | verify-config \u003cimg width=125/\u003e| | no |Verifies the integrity of an existing config file and outputs a usable config file based on it. Currently doesn't support gen2 backends. \n | version       | | no |Returns lithopscloud's package version|\n\n\u003cbr/\u003e\n\n#### Verify Additional ways of configuration\nUsing the ```verify-config``` option enables verification of additional valid ways of configuration, that otherwise \nleft unchecked. This mode scans for any possible subset of valid parameters and extract them to output a new \nlithops config file (e.g., verify cos configured by HMAC credentials).\nTo utilize simply run ```lithopscloud --verify-config CONFIG_FILE_PATH -o OUTPUT_FILE_PATH```\n\u003cbr/\u003e Please note that this feature doesn't currently support the verification of gen2 backends. \n\n## Supported backends:\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth align=\"center\"\u003e\n\u003cp\u003e\n\u003cspan style=\"color:orange\"\u003eStandalone Compute Backends\u003c/span\u003e \n\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"center\"\u003e\n\n\u003cp\u003e\n\u003cspan style=\"color:orange\"\u003eServerless Compute Backends\u003c/span\u003e \n\u003c/p\u003e\n\u003c/th\u003e\n\u003cth align=\"center\"\u003e\n\u003cp\u003e\n\u003cspan style=\"color:orange\"\u003eStorage Backends\u003c/span\u003e \n\u003c/p\u003e\n\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n- Gen2/Lithops\n- Gen2/Ray\n- Local Host\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n- IBM Cloud Functions\n- IBM Code Engine\n\u003c/td\u003e\n\u003ctd\u003e\n\n- IBM Cloud Object Storage\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Using lithopscloud to generate config file without user interaction\nIn order to let lithopscloud generate config file based on some defaults and create vpc and all its peripherial assets automatically, please run:\n\n```\nlithopscloud -a \u003cAPI_KEY\u003e -b \u003cBACKEND\u003e --defaults\n```\n\n* currently, lithops `gen2` is the only supported backend\n\n### Using lithopscloud config tool programmatically\nNotice, not all fields are mandatory. Unspecified resources will be created automatically on the backend.\n\nE.g.\nIf existing vpc id not provided - vpc will be created automatically with all required peripherial resources like security groups, gateway.. etc following minimal default requierments\nIf ssh key details not provided - new ssh key pair will be generated and registered in ibm cloud\n\n\n##### Lithops Gen2\n```\nfrom lithopscloud import generate_config\nfrom lithopscloud import LITHOPS_GEN2, LITHOPS_CF, LITHOPS_CE, RAY_GEN2, LOCAL_HOST\n\napi_key = '\u003cIAM_API_KEY\u003e'\nregion = 'eu-de'\ngenerate_config(LITHOPS_GEN2, api_key, region, cos_bucket_name='kpavel-bucket', image_id='r010-5a674db7-95aa-45c5-a2f1-a6aa9d7e93ad', key_id='r010-fe6cb103-60e6-46bc-9cb5-14e415990849', ssh_key_filename='/home/kpavel/.ssh/id_rsa', profile_name='bx2-2x8', vpc_id='r010-af1adda4-e4e5-4060-9aa2-7a0c981aff8e')\n\n```\n\nMandatory fields are: backend_type (LITHOPS_GEN2), api_key, region and cos_bucket.\nMinimal example:\n\n```\nfrom lithopscloud import generate_config\nfrom lithopscloud import LITHOPS_GEN2, RAY_GEN2\n\napi_key = \u003cIAM_API_KEY\u003e\nregion = 'ca-tor'\ncos_bucket_name='kpavel-bucket'\nconfig_file = generate_config(LITHOPS_GEN2, api_key, region, cos_bucket_name=cos_bucket_name)\n```\n\n###### Ray Gen2\n```\nfrom lithopscloud import generate_config\nfrom lithopscloud import RAY_GEN2\n\napi_key = '\u003cIAM_API_KEY\u003e'\nregion = 'eu-de'\ngenerate_config(RAY_GEN2, api_key, region, image_id='r010-5a674db7-95aa-45c5-a2f1-a6aa9d7e93ad', key_id='r010-fe6cb103-60e6-46bc-9cb5-14e415990849', ssh_key_filename='/home/kpavel/.ssh/id_rsa', profile_name='bx2-2x8', vpc_id='r010-af1adda4-e4e5-4060-9aa2-7a0c981aff8e', min_workers=1, max_workers=1)\n```\n\nMandatory fields are: backend_type (LITHOPS_GEN2), api_key, region and cos_bucket.\nMinimal example:\n\n```\nfrom lithopscloud import generate_config\nfrom lithopscloud import RAY_GEN2\n\napi_key = \u003cIAM_API_KEY\u003e\nregion = 'eu-de'\nconfig_file = generate_config(RAY_GEN2, api_key, region)\n```\n\n## For Contributors\n\n### Add new unsupported sections to config file\n\n#### If the new configuration is provider specific\n\n1. implement [__config_builder.py__](src/lithopscloud/modules/config_builder.py) interface\n2. add your implementation under __provider__ package\n3. add reference to your implementation in the list of exported modules, e.g. [lithops modules](src/lithopscloud/modules/lithops/__init__.py__)\n\n\n#### If the new configuration is common for multiple providers\n\n1. implement [__config_builder.py__](src/lithopscloud/modules/config_builder.py) interface to hold common logic\n2. add your implementation to __modules__ package\n3. extend your common implementation under each provider package, e.g. [lithops image.py](src/lithopscloud/modules/lithops/image.py) and [ray image.py](src/lithopscloud/modules/ray/image.py) to have config file specific logic\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flithops-cloud%2Flithopscloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flithops-cloud%2Flithopscloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flithops-cloud%2Flithopscloud/lists"}