{"id":19756616,"url":"https://github.com/esnet/data-transfer-bootstrap","last_synced_at":"2026-02-23T16:33:23.615Z","repository":{"id":246085866,"uuid":"819662233","full_name":"esnet/data-transfer-bootstrap","owner":"esnet","description":"Ansible role to bootstrap Django Globus Portal Framework data transfer sites","archived":false,"fork":false,"pushed_at":"2025-05-28T06:02:34.000Z","size":113044,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-10-29T18:07:16.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/esnet.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,"zenodo":null}},"created_at":"2024-06-25T00:52:40.000Z","updated_at":"2025-05-28T06:02:38.000Z","dependencies_parsed_at":"2024-08-29T03:22:39.871Z","dependency_job_id":"325d1292-d110-437d-9b04-1d3f4b46d2c1","html_url":"https://github.com/esnet/data-transfer-bootstrap","commit_stats":null,"previous_names":["esnet/data-transfer-bootstrap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/esnet/data-transfer-bootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esnet%2Fdata-transfer-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esnet%2Fdata-transfer-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esnet%2Fdata-transfer-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esnet%2Fdata-transfer-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esnet","download_url":"https://codeload.github.com/esnet/data-transfer-bootstrap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esnet%2Fdata-transfer-bootstrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29748210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-12T03:16:26.428Z","updated_at":"2026-02-23T16:33:23.597Z","avatar_url":"https://github.com/esnet.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to Use this Ansible Role\n\nThis ansible role is intended to redistribute a collection of best practices surrounding the Globus \"Django Globus Portal Framework\" and various related work, including cookiecutter install scripts\n\n## Topics\n\n- [Installation](#installation)\n- [Customization](#customization)\n- [Settings](#settings)\n  - [Required Settings](#required-settings)\n  - [Styling Settings](#styling-settings)\n  - [Template Settings](#template-settings)\n\n## Installation\n\nGenerally, this role can be used to install the data portal into a number of targets. See [Installation Targets](#installation-targets) to\nselect the target that will work best for your situation.\n\n### Installation Targets\n\nThis ansible role can be installed or used in a number of ways:\n\n- [Install from Existing Docker Image](#install-from-existing-docker-image)\n- [Build and Publish Custom Docker Image](#build-and-publish-docker-image)\n- [Install to VM with Ansible](#install-to-vm-with-ansible)\n\nIf you want to install directly to a VM, you should use the \"Install to VM\" instructions below.\n\n### Install from existing Docker Image\n\nThis is the simplest way to get started with this repo. Just:\n\n```\ndocker run jkafader-esnet/globus-portal\n```\n\nThen point a brower to http://localhost:8080\n\nThis image can be customized using docker mount points. See [Customization With Docker](#customization-with-docker) below.\n\n### Publishing for production\n\nIf you're using the instructions for [Installing from an Existing Docker Image](#install-from-existing-docker-image),\nyou'll need to use some type of reverse proxy (usually nginx or apache2) \nwith SSL encryption in front of the running docker image.\n\nConfiguring a reverse proxy is outside the scope of this documentation, but\na good guide can be found via google.\n\n\n### Build and publish Docker Image\n\nGenerally, these instructions are for developers on this repo, or \n\n1. Assumption: You use ~/work for work-related files\n```\nexport WORK_DIR=~/work\n```\n\n2. Clone this repo\n```\ncd $WORK_DIR\ngit clone git@github.com:esnet/data-transfer-bootstrap.git\n```\n\n3. Create a virtualenv for installing ansible\n```\npython3 -m venv $WORK_DIR/ansible-venv\n```\n\n4. Activate the Ansible virtualenv\n```\nsource $WORK_DIR/ansible-venv/bin/activate\n```\n\n5. Install the python 'docker' module (note that this is not docker)\n```\npip install docker\n```\n\n6. Install ansible\n```\npip install ansible\n```\n\n7. Deactivate virtual environment\n```\ndeactivate\n```\n\n8. Re-activate the ansible venv\n```\nsource $WORK_DIR/ansible-venv/bin/activate\n```\n\n9. Start the target docker container, map port 80 in the container to localhost:8080\n```\ndocker build -t globus-portal .\ndocker run -d -t --name=globus-portal -p 8080:80 globus-portal\n```\n\n10. if so, we're ready to run the role which will bring up the image\n```\ncd $WORK_DIR/data-transfer-bootstrap\nansible-playbook --connection docker --inventory inventory playbooks/docker.yml\n```\n\n11. Commit the ansible changes from the container to the image using `docker commit`\n```\ndocker commit globus-portal\n```\n\n12. Kill the running docker container and restart it\n```\ndocker stop globus-portal\ndocker run globus-portal\n```\n\n13. Use a brower to deal check that the application is running\n\nhttp://localhost:8080\n\n\n14. After verifying that the image is working as desired, publish it to docker:\n\n```\ndocker push esnet/globus-portal\n```\n\n15. Users will now be able to follow instructions under [Install from Existing Docker Image](#install-from-existing-docker-image)\n\n### Install to VM with Ansible\n\n1. Assumption: You use ~/work for work-related files\n```\nexport WORK_DIR=~/work\n```\n\n2. Clone this repo\n```\ncd $WORK_DIR\ngit clone git@github.com:esnet/data-transfer-bootstrap.git\n```\n\n3. Create a virtualenv for installing ansible\n```\npython3 -m venv $WORK_DIR/ansible-venv\n```\n\n4. Activate the Ansible virtualenv\n```\nsource $WORK_DIR/ansible-venv/bin/activate\n```\n\n5. Install ansible\n```\npip install ansible\n```\n\n6. Deactivate virtual environment\n```\ndeactivate\n```\n\n7. Re-activate the ansible venv\n```\nsource $WORK_DIR/ansible-venv/bin/activate\n```\n\n8. Edit the `[development]` or `[production]` hosts in the inventory file. (Replace `vi` with an editor of your choice if desired)\n\n```\ncd $WORK_DIR/data-transfer-bootstrap\nvi inventory\n```\n\n9. Install ansible role to development hosts from inventory.\n```\ncd $WORK_DIR/data-transfer-bootstrap\nansible-playbook --inventory inventory playbooks/development.yml\n```\n\n10. Check your work by visiting your development host. You should see a data transfer site running on the HTTPS port, 443.\n\n11. Make any changes or customizations needed, redeploying regularly to your development host\n```\ncd $WORK_DIR/data-transfer-bootstrap\nansible-playbook --inventory inventory playbooks/development.yml\n```\n\n12. Install ansible role to production hosts when ready.\n```\ncd $WORK_DIR/data-transfer-bootstrap\nansible-playbook --inventory inventory playbooks/production.yml\n```\n\n13. Check your work by visiting your production host on HTTPS.\n\n\n## Customization with Docker\n\nThis project is heavily customizable. The simplest way to get a running site is by \n[Installing with the default Docker Image](#install-from-existing-docker-image). \nHowever, this will serve a default site. This section gives some direction on \ncustomizing the default docker image.\n\n### Docker Mount Points\n\nDocker supports the concept of \"mounting\" external files to the root filesystem\nwithin the docker container. The default image looks for files from a number of \nmount points:\n\n- `/mnt/templates` Django/Jinja2 templates\n- `/mnt/static/fonts` Custom Fonts\n- `/mnt/static/images` Custom images\n- `/mnt/static/js` Custom Javascript\n\nGenerally, users will first want to customize templates, then add images, javascript,\nand fonts as needed to support their customizations. See [Template Locations](template-locations)\nbelow for details on which templates you're likely to want to override.\n\n\n## Customization with Ansible\n\nThis project is heavily customizable. While you can customize many details about the UI using the\n[Ansible Settings File](#the-settings-file), your institution may want to change the\nheader, footer, some, or all of the content presented on the site. To do this, you will need to\ncustomize the [Jinja2](#https://jinja.palletsprojects.com/en/2.10.x/templates/) HTML templates listed below\n\n## Custom Templates\n\n### Template locations\n\nCustomizable templates are stored in `templates` directory. Each template name is linked in the\n[Ansible Settings File](#the-ansible-settings-file). The current files in the templates directory are:\n\n#### Header Block Template\n\nThis is the header block on all pages. Most installations will want to customize this, to match the look and feel of your organization or team.\n\n```\ntemplates/header.html \n```\n\n#### Footer Block Template\n\nThis is the footer block on all pages. Most installations will want to customize this, to match the look and feel of your organization or team.\n\n```\ntemplates/footer.html \n```\n\n#### Base Template\n\nThis page is the \"framework\" that all other pages will use to display their content. It's the \"base\" page that all others \"inherit\" from.\n\n```\ntemplates/base.html\n```\n\n#### Main Page\n\nThis page is the landing / main / index.html page for the site.\n\n```\ntemplates/main.html\n```\n\n##### Main Page: \"Getting Started\" block\n\nThis block allows you to override the \"getting started\" block, if needed.\n\n```\ntemplates/getting_started_block.html\n```\n\n##### Main Page: \"Documentation\" block\n\nThis block allows you to override the \"documentation\" block, if needed.\n\n```\ntemplates/documentation_block.html\n```\n\n#### Transfer Page\n\nThis is the page that allows users to initiate a transfer\n\n```\ntemplates/transfers.html\n```\n\n#### Documentation Page\n\nThis page shows a documentation overview and documentation sections. The URLs correspond to the names of files in the [Individual Documentation Sections](#individual-documentation-sections). When a user visits `/documentation/`, they see `templates/documentation/overview.html`, at `/documentation/transfers/` they see `templates/documentation/transfers.html`.\n\n```\ntemplates/documentation.html\n```\n\n#### Individual Documentation Sections\n\nThese are all stored in the `templates/documentation` directory.\n\n```\ntemplates/documentation/overview.html\ntemplates/documentation/transfers.html\n```\n\n### Re-deploying Templates\n\nDuring the lifecycle of your site, you will likely need to deploy templates multiple times to \"get them right.\" We made a special shortcut for this workflow to speed things up:\n\n```\nansible-playbook --connection docker --inventory inventory playbooks/templates.yml\n```\n\n## The Ansible Settings File\n\nIf you're [Installing to a VM](#install-to-vm-with-ansible), the ansible\nsettings file will be of particular interest to you. You'll need to\nspecify [Required Settings](#required-settings) as below to configure\nglobus transfers properly.\n\n### Required Settings\n\nGlobus settings are required for this ansible role to function. Most of these settings will need to be determined at https://app.globus.com/\n\n\n```\nglobus.client_id\n```\nThe client ID is available from the \"settings\" section, under \"developers:\" https://app.globus.org/settings/developers. It is listed as \"Project UUID\" in the UI as of this writing. It is a UUID in the form of `1234567-1234-1234-1234-123456789012`. You will have to be logged in as an administrator to register a Project (using the \"+ Add Project\" button in the UI) to find this setting.\n\n```\nglobus.secret_key\n```\n\nThe secret key is also available from the \"developers\" section. This should be available in the UI immediately after registering your project. It is a long string. \n\n```\nglobus.search_index\n```\nThis setting is currently not used, but is required to be set by the globus framework this project depends on. We typically set it to a nonsense value like `1234567-1234-1234-1234-123456789012`\n\n\n```\nglobus.collections\n```\n\nThis is a YAML list of collections in your account, listed with their UUIDs. You can find the UUID for each collection by navigating to it in the globus UI and copying the UUID from the URL bar.\n\n\nHere is an example of a fully filled in `globus` section for the config file:\n\n```\nglobus:\n  client_id: 1234567-1234-1234-1234-123456789012\n  secret_key: akldichfj8e9vnowinuNEFFEJ0\n  search_index: null\n  collections:\n    - id: 1234567-1234-1234-1234-123456789012\n      name: Example collection 1\n      description: This collection is included as an example.\n    - id: 1234567-1234-1234-1234-123456789012\n      name: Example collection 2\n      description: This collection is included as an example.\n    - id: 1234567-1234-1234-1234-123456789012\n      name: Example collection 3\n      description: This collection is included as an example.\n```\n\n### Styling Settings\n\nIn the `colors` section, you can specify some colors to make sure your data transfer site matches your organization's branding.\n\nThe default set of colors:\n```\ncolors:\n  header: \"#333333\"\n  primary: \"#AAAAFF\"\n  secondary: \"#AAAAAA\"\n  surfaces:\n    - \"#FFFFFF\"\n    - \"#EEEEEE\"\n    - \"#DDDDDD\"\n```\n\n### Templates Settings\n\nThe `templates` section specifies templates that will be installed by ansible. You can either customize this default set of templates, or you can add new templates to the list. The templates use `{% django_style %}` tags and variable substitution `{{ like_this }}`. \n\n#### Two-step Template Rendering\n\nSome sections of the templates are rendered by ansible, and some are rendered in the django template engine. \n\nFor this project ansible uses a special different rendering syntax. Tags look ```[% like_this %]``` and variables look `[[ like_this ]]`. This was done because some templates must be rendered during ansible deployment, whereas others must be rendered at runtime.\n\nIt will take some trial and error to understand when different variables are available, but generally, the settings (from settings.yml) are available at ansible deployment time and everything else will use the normal django syntax at runtime.\n\nAs of this writing, current documentation on django template syntax is available here: https://docs.djangoproject.com/en/5.1/topics/templates/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesnet%2Fdata-transfer-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesnet%2Fdata-transfer-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesnet%2Fdata-transfer-bootstrap/lists"}