{"id":15576544,"url":"https://github.com/abn/victims-server-openshift","last_synced_at":"2025-03-12T17:40:36.953Z","repository":{"id":149542048,"uuid":"10493771","full_name":"abn/victims-server-openshift","owner":"abn","description":null,"archived":false,"fork":false,"pushed_at":"2013-06-07T07:01:03.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T10:32:21.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/abn.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}},"created_at":"2013-06-05T02:57:20.000Z","updated_at":"2014-03-03T02:26:14.000Z","dependencies_parsed_at":"2023-04-01T02:37:51.532Z","dependency_job_id":null,"html_url":"https://github.com/abn/victims-server-openshift","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/abn%2Fvictims-server-openshift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fvictims-server-openshift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fvictims-server-openshift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fvictims-server-openshift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abn","download_url":"https://codeload.github.com/abn/victims-server-openshift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243266548,"owners_count":20263756,"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-10-02T18:51:24.985Z","updated_at":"2025-03-12T17:40:36.920Z","avatar_url":"https://github.com/abn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"victims-server-openshift\n========================\n\n**NOTE**: This is superceded by https://github.com/victims/victims-server-openshift\n\nThis repo allows you to deploy a new instance of the victims-web server on openshift.\n\n## Running on OpenShift\n### Prerequisites\n1. You have a valid account with OpenShift\n2. You have followed the instructions at https://www.openshift.com/get-started\n3. You have *rhc* installed and ready\n\n### Creating the app\n#### One Shot Deployment\nThis is pretty straight forward, run the following command. The app should be deployed to ```http://victims-NAMESPACE.rhcloud.com```. See bottom for a sample output.\n```sh\nrhc app create victims mongodb-2.2 python-2.6 --from-code git://github.com/abn/victims-server-openshift.git\n```\n#### Alternative Deployment\nThis can be useful if the *One Shot* option fails or if you want to configure the instance from build 1.\n```sh\nrhc app create victims mongodb-2.2 python-2.6\ncd victims\ngit remote add upstream -m master git://github.com/abn/victims-server-openshift.git\ngit pull -s recursive -X theirs upstream master\n# Make any configuration changes here and commit them.\ngit push origin master\n```\n### Importing data\n1. Get the app's SSH address by running ```rhc app show victims```\n2. SSH into the server.\n3. Download the data file you want to import to ```$OPENSHIFT_DATA_DIR```\n4. Run the following command replacing ```$INPUTFILE``` with your file name.\n\n```sh\nmongoimport -d $OPENSHIFT_APP_NAME -c hashes --type json --file $OPENSHIFT_DATA_DIR/$INPUTFILE  -h $OPENSHIFT_MONGODB_DB_HOST  -u admin -p $OPENSHIFT_MONGODB_DB_PASSWORD --port $OPENSHIFT_MONGODB_DB_PORT\n```\n### Configuring the deploytment\n#### Application Configuration\nAny application configuration can be pushed by changing the ```configs/victimsweb.cfg``` file in the repo. This will be used instead of the ```application.cfg``` provided by victims-web.\n#### Build Hook Configuration\nWe use ```configs/victimsweb.build.env``` file for doing a few build time tricks. This file is sourced before a the build hook executes.\n\n1. Branches/Tags: You can specify this as ```VICTIMS_GIT_BRANCH=master```. By default the master branch is checked out and used.\n2. Specify your fork: This can be done by setting ```VICTIMS_GIT_URL``` to your repository url. This will delete any existing checkout.\n3. Clean checkout: You can request this by setting ```VICTIMS_GIT_CLEAN=0``` to ```1```.\n\n### Sample creation output\n```sh\n$ rhc app create victims mongodb-2.2 python-2.6 --from-code git://github.com/abn/victims-server-openshift.git\nApplication Options\n-------------------\n  Namespace:   abn\n  Cartridges:  mongodb-2.2, python-2.6\n  Source Code: git://github.com/abn/victims-server-openshift.git\n  Gear Size:   default\n  Scaling:     no\n\nCreating application 'victims' ... done\n\nWaiting for your DNS name to be available ... done\n\nDownloading the application Git repository ...\nCloning into 'victims'...\nWarning: Permanently added the RSA host key for IP address '**.***.***.**' to the list of known hosts.\n\nYour application code is now in 'victims'\n\nvictims @ http://victims-abn.rhcloud.com/ (uuid: **********************)\n--------------------------------------------------------------------------\n  Created:         7:33 PM\n  Gears:           1 (defaults to small)\n  Git URL:         ssh://$UID@victims-abn.rhcloud.com/~/git/victims.git/\n  Initial Git URL: git://github.com/abn/victims-server-openshift.git\n  SSH:             $UID@victims-abn.rhcloud.com\n\n  python-2.6 (Python 2.6)\n  -----------------------\n    Gears: Located with mongodb-2.2\n\n  mongodb-2.2 (MongoDB NoSQL Database 2.2)\n  ----------------------------------------\n    Gears:          Located with python-2.6\n    Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/\n    Database Name:  victims\n    Password:       ***********\n    Username:       admin\n\nRESULT:\nApplication victims was created.\nMongoDB 2.2 database added.  Please make note of these credentials:\n   Root User:     admin\n   Root Password: ***********\n   Database Name: victims\nConnection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabn%2Fvictims-server-openshift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabn%2Fvictims-server-openshift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabn%2Fvictims-server-openshift/lists"}