{"id":18524442,"url":"https://github.com/stelligent/dromedary","last_synced_at":"2025-08-20T20:32:44.495Z","repository":{"id":48766848,"uuid":"40939595","full_name":"stelligent/dromedary","owner":"stelligent","description":"Sample app to demonstrate a working pipeline using Infrastructure as Code and AWS Code Services","archived":false,"fork":false,"pushed_at":"2023-01-18T20:46:44.000Z","size":821,"stargazers_count":105,"open_issues_count":24,"forks_count":98,"subscribers_count":82,"default_branch":"master","last_synced_at":"2025-04-07T20:50:07.186Z","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/stelligent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-18T00:21:39.000Z","updated_at":"2025-01-02T01:01:07.000Z","dependencies_parsed_at":"2023-01-19T08:30:58.835Z","dependency_job_id":null,"html_url":"https://github.com/stelligent/dromedary","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stelligent/dromedary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fdromedary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fdromedary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fdromedary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fdromedary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stelligent","download_url":"https://codeload.github.com/stelligent/dromedary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelligent%2Fdromedary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271378680,"owners_count":24749192,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-06T17:41:41.557Z","updated_at":"2025-08-20T20:32:43.975Z","avatar_url":"https://github.com/stelligent.png","language":"JavaScript","funding_links":[],"categories":["Examples"],"sub_categories":[],"readme":"# dromedary :dromedary_camel:\nSample app to demonstrate a working pipeline using [AWS Code Services](https://aws.amazon.com/awscode/)\n\n## Infrastructure as Code\n\nDromedary was featured by [Paul Duvall](https://twitter.com/PaulDuvall),\n[Stelligent](http://www.stelligent.com/)'s Chief Technology Officer, during the\nARC307: Infrastructure as Code breakout session at 2015\n[AWS re:Invent](https://reinvent.awsevents.com/).\n\nClick [here](https://www.youtube.com/watch?v=WL2xSMVXy5w) to view a recording of the re:Invent breakout session or, to view a shorter 10-minute walkthrough of the demo, click [here](https://stelligent.com/2015/11/17/stelligent-aws-continuous-delivery-demo-screencast/).\n\n## The Demo App :dromedary_camel:\n\nThe Dromedary demo app is a simple nodejs application that displays a pie chart to users. The data that\ndescribes the pie chart (i.e. the colors and their values) is served by the application.\n\nIf a user clicks on a particular color segment in the chart, the frontend will send a request to the\nbackend to increment the value for that color and update the chart with the new value.\n\nThe frontend will also poll the backend for changes to values of the colors of the pie chart and update the chart\nappropriately. If it detects that a new version of the app has been deployed, it will reload the page.\n\nDirections are provided to run this demo in AWS and locally.\n\n## Core Demo Requirements\n\nGiven a version-control repository, the bootstrapping and the application must be capable of launching from a single _CloudFormation_ command and a CloudFormation button click - assuming that an [EC2 Key Pair](http://docs.aws.amazon.com/gettingstarted/latest/wah/getting-started-prereq.html#create-a-key-pair) and [Route 53 Hosted Zone](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingHostedZone.html) has been configured. The demo should not be required to run from a local environment. \n\nAn application pipeline in CodePipeline must go from commit to production in less than 10 minutes.\n\nIt should be capable of running on a new AWS account without any additional setup.\n\n## Feature Backlog :dromedary_camel:\n\nWe plan to add additional features in the coming months. Check the [issues](https://github.com/stelligent/dromedary/issues) and [Feature Backlog](https://github.com/stelligent/dromedary/wiki/Feature-Backlog) for more information.\n\n### Running in AWS :dromedary_camel:\n\n**DISCLAIMER**: Executing the following will create billable AWS resources in your account. Be sure to clean\nup Dromedary resources after you are done to minimize charges\n\n**PLEASE NOTE**: This demo is an exercise in _Infrastructure as Code_, and is meant to demonstrate neither\nbest practices in highly available nor highly secure deployments in AWS.\n\n#### CloudFormation Bootstrapping (e.g. for AWS Test Drive)\n\nYou'll need the AWS CLI tools [installed](https://aws.amazon.com/cli/) and [configured](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) to start.\n\nYou'll also need to create a hosted zone in [Route53](https://aws.amazon.com/route53/). This hosted zone does\nnot necessarily need to be publicly available and a registered domain.\n\nYou can either use the AWS CLI or the AWS web console to launch a new CloudFormation stack. To launch from the console, click the button below (you'll need to login to your AWS account if you have not already done so).\n\n[![Launch CFN stack](https://s3.amazonaws.com/stelligent-training-public/public/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#cstack=sn~DromedaryStack|turl~https://s3.amazonaws.com/stelligent-training-public/master/dromedary-master.json)\n\nTo launch from the CLI, see this example:\n\n```\naws cloudformation create-stack \\\n--stack-name DromedaryStack  \\ \n--template-body https://raw.githubusercontent.com/stelligent/dromedary/master/pipeline/cfn/dromedary-master.json \\ \n--region us-east-1 \\\n--disable-rollback --capabilities=\"CAPABILITY_IAM\" \\\n--parameters ParameterKey=KeyName,ParameterValue=YOURKEYPAIR \\\n\tParameterKey=Branch,ParameterValue=master \\\n\tParameterKey=BaseTemplateURL,ParameterValue=https://s3.amazonaws.com/stelligent-training-public/master/ \\\n\tParameterKey=GitHubUser,ParameterValue=YOURGITHUBUSER \\\n\tParameterKey=GitHubToken,ParameterValue=YOURGITHUBTOKEN \\ \n\tParameterKey=DDBTableName,ParameterValue=YOURUNIQUEDDBTABLENAME \\\n\tParameterKey=ProdHostedZone,ParameterValue=.YOURHOSTEDZONE\n```\n\nIn the above example, you'll need to set the `YOURHOSTEDZONE` value to your Route53 hosted zone. See [Hosted Zones](https://console.aws.amazon.com/route53/home?region=us-east-1#hosted-zones:) for the hosted zones configured in your AWS account.\n\nTo integrate with GitHub, AWS CodePipeline uses OAuth tokens. Generate your token at [GitHub](https://github.com/settings/tokens) and ensure you enable the following two scopes:\n* `admin:repo_hook`, which is used to detect when you have committed and pushed changes to the repository\n* `repo`, which is used to read and pull artifacts from public and private repositories into a pipeline\n\nParameters | Description\n---------- | ------------\nKeyName | The EC2 keypair name to use for ssh access to the bootstrapping instance.\nGitHubUser | GitHub UserName. This username must be the owner of the Repo.\nGitHubToken | Secret. OAuthToken with access to Repo. Go to https://github.com/settings/tokens.\nBaseTemplateURL | S3 Base URL of all the CloudFormation templated used in Dromedary (without the file names)\nDDBTableName | Unique TableName for the Dromedary DynamoDB database.\nProdHostedZone | Route53 Hosted Zone. You must precede `YOURHOSTEDZONE` with a `.` See [Hosted Zones](https://console.aws.amazon.com/route53/home?region=us-east-1#hosted-zones:) for the hosted zones configured in your AWS account. \n\nAs part of the bootstrapping process, it will automatically launch the Dromedary application stack via CodePipeline. \n\n#### Outputs\n\nA few of the most relevant CloudFormation outputs from the master stack are listed in the table below.\n\nOutput | Description\n---------- | ------------\nCodePipelineURL | The URL to the instantiated pipeline\nJenkinsURL | The URL to Jenkins server that runs the execution of jobs for CodePipeline\nDromedaryAppURL | Link to the working application once the application pipeline is complete\n\n#### Post-bootstrap steps\n\n **IMPORTANT**: You will need to manually delete the CloudFormation stack once you've completed usage. You will be charged for AWS resource usage.\n\n**Bootstrapping Tests**\nView the outputs in CloudFormation for links to test reports uploaded to your Dromedary S3 bucket.\n\nUpon completion of a successful pipeline execution, Dromedary will be available by going to the Outputs tab on the master CloudFormation stack and clicking on the value for the `DromedaryAppURL` Output. If that hosted zone is not a publicly registered domain, you can access Dromedary via IP address. The IP address can be queried by viewing the EIP output of the ENI CloudFormation stack.\n\nEvery time changes are pushed to Github, CodePipeline will build, test, deploy and release those changes.\n\n#### Configure Jenkins Security\n\n**IMPORTANT**: It's very important that you enable Jenkins security.\n\nFrom CodePipeline, click on any of the Actions to launch Jenkins. From Jenkins, perform the following steps to configure security:\n\n1. Manage `Jenkins` \u003e `Configure Global Security`\n1. Check `Enable Security`\n1. Click `Jenkins’ own user database`\n1. Check `Allow users to sign up`\n1. Check `Logged in users can do anything`\n1. Click the `Save` button\n1. Click `Sign Up` in the top right to create an account\n1. Save and login as that user\n1. Manage `Jenkins` \u003e `Configure Global Security`\n1. Check `Matrix Based Security`\n1. Add a line for the user you just created \n1. Check the `Administer` box\n1. Click the `Save` button\n\n#### Cleanup\nTo delete (nearly) all Dromedary resources, delete any Dromedary application stacks and delete the master CloudFormation stack. The only resources that remain and require manual deletion is the Dromedary S3 bucket.\n\n### Running Locally :dromedary_camel:\n\n#### Install Prerequisites \n\n1. Ensure [nodejs](https://nodejs.org/) and [npm](https://www.npmjs.com/) are installed\n  * On Mac OS X, this can be done via [Homebrew](http://brew.sh/): `brew install node`\n  * On Amazon Linux, packages are available via the [EPEL](https://fedoraproject.org/wiki/EPEL) yum repo: `yum install -y nodejs npm --enablerepo=epel`\n1. Java must be installed so that [DynamoDB Local](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html) can run\n1. Install dependencies: `npm install`\n\nNOTE: Dromedary relies on [gulp](http://gulpjs.com/) for local development and build tasks.\nYou may need to install gulp globally: `npm install -g gulp`\n\nIf gulp is not globally installed, ensure `./node_modules/.bin/` is in your PATH.\n\n#### Local Server\n\nThe default task will start dynamodb-local on port 8079 and a node server listening on port 8080:\n\n1. Run `gulp` - this downloads and starts DynamoDB Local and starts Node\n1. Point your webbrowser to [http://localhost:8080](http://localhost:8080)\n\n#### Executing Unit Tests\n\nUnit tests located in `test/` were written using [Mocha](https://mochajs.org/) and [Chai](http://chaijs.com/),\nand can be executed using the `test` task:\n\n1. Run `gulp test`\n\n#### Executing Acceptance Tests\n\nAcceptance tests located in `tests-functional/` require Dromedary to be running (eg: `gulp`), and can be\nexecuted using the `test-functional` task:\n\n1. Run `gulp test-functional`\n\nThese tests (which, at this time are closer to integration tests than functional tests) exercise the API\nendpoints defined in `app.js`.\n\n#### Building a Distributable Archive\n\nThe `dist` task copies relevant files to `dist/` and installs only dependencies required to run the standalone\napp:\n\n1. Run `gulp dist`\n\n`dist/archive.tar.gz` will be created if this task run successfully.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelligent%2Fdromedary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstelligent%2Fdromedary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelligent%2Fdromedary/lists"}