{"id":20471746,"url":"https://github.com/signiant/service-generator","last_synced_at":"2025-03-05T13:44:25.381Z","repository":{"id":93381089,"uuid":"53618265","full_name":"Signiant/service-generator","owner":"Signiant","description":"Quickly bootstrap deployment ready services","archived":false,"fork":false,"pushed_at":"2019-07-31T19:58:31.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-16T02:23:33.875Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Signiant.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-10T21:26:51.000Z","updated_at":"2018-03-10T16:54:21.000Z","dependencies_parsed_at":"2023-08-25T14:31:18.337Z","dependency_job_id":null,"html_url":"https://github.com/Signiant/service-generator","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/Signiant%2Fservice-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fservice-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fservice-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Signiant%2Fservice-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Signiant","download_url":"https://codeload.github.com/Signiant/service-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242039536,"owners_count":20061924,"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-11-15T14:17:08.404Z","updated_at":"2025-03-05T13:44:25.374Z","avatar_url":"https://github.com/Signiant.png","language":"JavaScript","readme":"# Signiant Service Generator\nThe Signiant Service Generation tool handles setting up everything you need to get your service up and running. We take care of setting up the project structure, initializing the git repository, and creating the jenkins build plan. Answer a few questions, tell us where to put it, and we will create a service that is ready to deploy at the click of a button.\n\nCurrently, Lambda Functions and ECS Microservices are supported.\n\n##### How do I use it?\nUsing the tool is easy, all you need to do is create an empty repository for your project. Once you've created the repository, find and copy the http clone url, then simply open the tool and follow the prompts to create your service.\nUpon completion, you will be presented with links to new service's jenkins job and repository.\n\n### Setup\nFirst clone the repository.\nNext, install the dependencies by running\n```\n npm install\n```\nand  \n```\nbower install\n```\n\nOnce the dependencies are installed you will need to setup your jenkins and phabricator credentials.  Modify the config/auth.json file, replacing the values for user, baseUrl, and token with your own.  \n\nGit must also be set up on your machine and be configured with the proper credentials to push to the repositories you create for your service over http.\n\nSee below for instructions on adding generators\n\nOnce configured, run the service generator using the following command\n```\nnode server.js\n```\n\n### Making Compatible Generators\nIn order for a yeoman generator to be compatible with the service generation tool, it must provide and alternate set of angular schema form style prompts.\nWhen the service generation tool runs a generator, it provides a webPrompts option, set to true, indicating that the alternate set of prompts should be used.  It also sets the option 'skip-install' to true, and supplies an argument 'appname'.  \n\n#### Angular Schema Style Prompts  \nWhen a generator is running in the service-generator environment, this.prompt will expect an array of angular schema form definitions instead of an array of prompts.  \nAn asf definition is a javascript object with a schema property and an optional form property.  If the form property is not present, the service generation tool will create a form using the schema definition, adding a submit and cancel button to the bottom.  In most cases no form object is required.  \nFor more on angular schema form head over to their [project](https://github.com/json-schema-form/angular-schema-form) and check out the [documentation](https://github.com/json-schema-form/angular-schema-form/blob/development/docs/index.md).\n\nBelow is an example prompt, asking the user for their name and age, requiring that the age be at least 13\n```\nvar done = this.async();\nthis.prompt([{\n    \"schema\": {\n        \"name\": {\n            \"type\": \"string\",\n            \"title\": \"Name\",\n            \"required\": true\n        },\n        \"age\": {\n            \"type\": \"integer\",\n            \"title\": \"Age\",\n            \"minimum\": 13,\n            \"default\": 13,\n            \"required\": true\n        }\n   }\n}], function(answers){\n    // Handle answers\n    done();\n});\n```\n\nIf more than one asf definition is present in the array, they will be presented in multiple steps.\n\n#### Jenkins Jobs\nEach generator also must have a matching jenkins job.  Jenkins jobs are generated by copying a template and changing the scm url.  The template job for a service is found based on the following naming convention: template_\u003cgenerator name\u003e-build-master.  \n\nFor example, the template job for generator lambda would be named template_lambda-build-master.  \n\nIf your job does not follow this convention, or no job is created, the service generator will fail on the jenkins step.  \n\n### Adding Generators\nCreate a top level \"generators\" directory containing the generators you want to use.  If you wish to map an alternate name to your generator (when prompting user to select a service), add an entry to config/generator-names.json, setting the generator name as the key, and the alternate name as the value.  \n\nFor example, to use the name 'AWS Lambda Function' for generator-lambda, and the name 'AWS ECS Microservice' for generator-microservice, the generator-names.json config file would look like this:\n```  \n{\n  \"lambda\": \"AWS Lambda Function\",\n  \"microservice\": \"AWS ECS Microservice\"\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigniant%2Fservice-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigniant%2Fservice-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigniant%2Fservice-generator/lists"}