diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f3d5c41 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/user-story.md b/.github/ISSUE_TEMPLATE/user-story.md new file mode 100644 index 0000000..0a635a0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/user-story.md @@ -0,0 +1,27 @@ +--- +name: User story +about: This template provides a basic structure for user story issues. +title: '' +labels: '' +assignees: '' + +--- + +# User story +As a ..., I want to ..., so I can ... + +*Ideally, this is in the issue title, but if not, you can put it here. If so, delete this section.* + +# Acceptance criteria +- [ ] This is something that can be verified to show that this user story is satisfied. + +# Sprint Ready Checklist +- [ ] 1. Acceptance criteria defined +- [ ] 2. Team understands acceptance criteria +- [ ] 3. Team has defined solution / steps to satisfy acceptance criteria +- [ ] 4. Acceptance criteria is verifiable / testable +- [ ] 5. External / 3rd Party dependencies identified +- [ ] 6. Ticket is prioritized and sized + +# Notes +*Add any helpful notes here.* diff --git a/.github/workflows/tag_and_publish.yml b/.github/workflows/tag_and_publish.yml new file mode 100644 index 0000000..2aad22a --- /dev/null +++ b/.github/workflows/tag_and_publish.yml @@ -0,0 +1,38 @@ +name: Tag and publish +on: + push: + branches: + - main + paths: + - hortacloud-deployment/** +jobs: + tag: + uses: AllenNeuralDynamics/aind-github-actions/.github/workflows/tag.yml@main + secrets: + SERVICE_TOKEN: ${{ secrets.SERVICE_TOKEN }} + + publish: + runs-on: ubuntu-latest + needs: tag + steps: + - uses: actions/checkout@v3 + - name: Pull latest changes + run: git pull origin main + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Github Packages + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build image and push to GitHub Container Registry + uses: docker/build-push-action@v3 + with: + # relative path to the place where source code with Dockerfile is located + context: ./horta-deployment + push: true + tags: | + ghcr.io/allenneuraldynamics/hortacloud-deployment:${{ needs.tag.outputs.new_version }} + ghcr.io/allenneuraldynamics/hortacloud-deployment:latest diff --git a/hortacloud-deployment/Dockerfile b/hortacloud-deployment/Dockerfile new file mode 100644 index 0000000..6001fee --- /dev/null +++ b/hortacloud-deployment/Dockerfile @@ -0,0 +1,11 @@ +from node:16 + +RUN apt-get update && \ + apt-get install -y less + +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install && \ + rm awscliv2.zip + +RUN npm install -g aws-cdk diff --git a/hortacloud-deployment/README.md b/hortacloud-deployment/README.md new file mode 100644 index 0000000..3ae1f33 --- /dev/null +++ b/hortacloud-deployment/README.md @@ -0,0 +1,15 @@ +# hortacloud-deployment + +Dockerfile to build an image for deployment of hortacloud + +## Usage +Refer to hortacloud [deployment instructions](https://hortacloud.janelia.org/docs/administration/aws/deployment/) for detailed steps +### Container setup +- Run `docker pull ghcr.io/allenneuraldynamics/hortacloud-deployment:latest hortacloud` to pull the docker image. +- Run `docker run -it hortacloud bash` to run a container interactively. +### Horta deployment +- From your local machine, generate temporary aws credentials by running `aws sts -get-session-token`. Note the **AWS_ACCESS_KEY_ID**, **AWS_SECRET_ACCESS_KEY** and **AWS_SESSION_TOKEN** values from the output. +- Set up AWS credentials environment variables using the values from the the previous step. +- Run `git clone **https://github.com/JaneliaSciComp/hortacloud/**. +- In the cloned **hortacloud** folder, create/copy the **.env** file that contains all the required environment variables. If the **.env** variable is stored in a bucket, you can run `aws s3 cp s3://BUCKET_NAME/.env .env` to download it. +- Follow the hortacloud deployment instructions for the remaining steps.