Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from hexadecimalDinosaur/update-home
Browse files Browse the repository at this point in the history
Update home page
  • Loading branch information
hexadecimalDinosaur authored Oct 15, 2023
2 parents 74ba25e + dfa02bc commit 41b8640
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
4 changes: 2 additions & 2 deletions deploy_bundle/terraform.tfstate
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"labels": {},
"machine_type": "e2-micro",
"metadata": {
"ssh-keys": "admin:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCUYjapVRLkcTudagMZu/dGQbDId97YpzSKUTfxxUGYQnu7btkjGTN66Q+Cns8JUxZI2lXXXAILPLkTymyvrxjcXWmd0xRZfsue7SW3dR8/C8LweiJNSqRFwdqaqiNzYNL4nTmRBvIHOBxX04nUnLRBtB/P75UViiD1mio0RFCYyRZyoakeD5iFMmDsj4QqnANCzjrfSAssZiVjUwrDErBvG5t8r7oM+NZKLb+6VbWSPXhUWBV1L3d6p7LvI6BnKxDdVY96cUHtlIxFD6fTiXcuzjMTDaU/4xQObtts8ucSoQHbBTic8nDubnqocrGj8zoRbIv73FbHTIZrQ5YzUhfmJBmfibrfiNMApNmf+dY6LH1VkzD0BGbGJw6tdiwb6AZc2GsdkLyiCHPu9XAZo3YYO4HAes64C2iCXbTF0ydo4DeRiJQQ5lPgd3W4FprYDBR9lS+Ij2ap98MvdSPLgo/5j0Hhco/tsXPCDGLT2ZfgounzixjTXAXksdB326yuViM= runner@fv-az993-24\n"
"ssh-keys": "admin:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDfLRQghSU7rzh6KQdquJ1a57O9kcAOvTpV0reVI+5RghiwxaL6gEtcKYYQvpRbESh8X0O+bDRdThyiHKgCfzZtVJ5+LMPBlTSxHpZmBf8t4u3nn7zXXR5smt+F+ckCjXaX/8Vj+8Yc1zhs+8oq9h06mSc2pmXuaDm/Kw0l4iS1e92zmnxeLtxm4i/Ts+WKhfN9QVbJS6jmKK6JBmzssGTk8Vuuo+8CeMItC8Q1WfIZj4kPrAErbCslpplO9IiiIaP4rHYsTRpIy9hNxJntvYjl3nI9lWvTx0aHM1RnbCG5iH26mtgTXgnzKlqvwowaeSVdcuPKG4QEAaQEIOwS/0c/w7AM6mRbCpkl2Ls7bDZG9C/vir/i8tUAqXFqt0s8BlLxr0kn4Oj/FMXrvTpJlIy/9VpOpYdmjZ77heQQz/1TPdn7nbDDlLiLRZDDRFxcdA8F8qTcGsYzWssBYpRUzrW84O+3ASpBDPwvix4VNVxbuKTuS+ixJ/sEbTsf5p3nN00= runner@fv-az593-526\n"
},
"metadata_fingerprint": "6NPPx5NS-Lk=",
"metadata_fingerprint": "GUXhcdFMef0=",
"metadata_startup_script": null,
"min_cpu_platform": "",
"name": "infrabundle-webserver",
Expand Down
3 changes: 2 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
</ul>
</nav>
<section class="content">
<header>
<!-- <header>
{% block header %}{% endblock %}
</header>
-->
{% for message in get_flashed_messages() %}
<div class="flash">{{ message }}</div>
{% endfor %}
Expand Down
1 change: 1 addition & 0 deletions templates/deploy.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ <h1>{% block title %}Deploy{% endblock %}</h1>
{% endblock %}

{% block content %}
<h1>Deploy</h1>
<form method="post" id="deploy-form" action="/gen_bundle/">
<label for="project-name">Project Name</label>
<input name="project_name" id="project-name" required>
Expand Down
29 changes: 27 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,31 @@ <h1>{% block title %}Home{% endblock %}</h1>
{% endblock %}

{% block content %}
<h2>Welcome!</h2>
<p>This is the home page. More information to come.</p>
<h1 id="infrabundle">InfraBundle</h1>
<p>Submitted to Hack the Valley 8.0</p>
<h2 id="inspiration">Inspiration</h2>
<blockquote>
<p>#hackathon-help-channel <code>&lt;hacker&gt;</code> Can a mentor help us with flask and Python? We’re stuck on how to host our project.</p>
</blockquote>
<p>How many times have you created an epic web app for a hackathon but couldn’t deploy it to show publicly? At my first hackathon, my team worked hard on a Django + React app that only lived at <code>localhost:5000</code>.</p>
<p>Many new developers don’t have the infrastructure experience and knowledge required to deploy many of the amazing web apps they create for hackathons and side projects to the cloud.</p>
<p>We wanted to make a tool that enables developers to share their projects through deployments without any cloud infrastructure/DevOps knowledge</p>
<p>(Also, as 2 interns currently working in DevOps positions, we’ve been learning about lots of Infrastructure as Code (IaC), Configuration as Code (CaC), and automation tools, and we wanted to create a project to apply our learning.) ## What it does</p>
<p>InfraBundle aims to: 1. ask a user for information about their project 2. generate appropriate IaC and CaC code configurations 3. bundle configurations with GitHub Actions workflow to simplify deployment</p>
<p>Then, developers commit the bundle to their project repository where deployments become as easy as pushing to your branch (literally, that’s the trigger).</p>
<h2 id="how-we-built-it">How we built it</h2>
<p>As DevOps interns, we work with Ansible, Terraform, and CI/CD pipelines in an enterprise environment. We thought that these could help simplify the deployment process for hobbyists as well</p>
<p>InfraBundle uses: - Ansible (CaC) - Terraform (IaC) - GitHub Actions (CI/CD) - Python and jinja (generating CaC, IaC from templates) - flask! (website)</p>
<h2 id="challenges-we-ran-into">Challenges we ran into</h2>
<p>We’re relatitvely new to Terraform and Ansible and stumbled into some trouble with all the nitty-gritty aspects of setting up scripts from scratch.</p>
<p>In particular, we had trouble connecting an SSH key to the GitHub Action workflow for Ansible to use in each run. This led to the creation of temporary credentials that are generated in each run.</p>
<p>With Ansible, we had trouble creating and activating a virtual environment (see: not carefully reading <a href="https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip_module.html">ansible.builtin.pip</a> documentation on which parameters are mutually exclusive and confusing the multiple ways to pip install)</p>
<p>In general, hackathons are very time constrained. Unfortunately, slow pipelines do not care about your time constraints. - hard to test locally - cluttering commit history when debugging pipelines</p>
<h2 id="accomplishments-that-were-proud-of">Accomplishments that we’re proud of</h2>
<p>InfraBundle is capable of deploying itself!</p>
<p>In other news, we’re proud of the project being something we’re genuinely interested in as a way to apply our learning. Although there’s more functionality we wished to implement, we learned a lot about the tools used. We also used a GitHub project board to keep track of tasks for each step of the automation.</p>
<h2 id="what-we-learned">What we learned</h2>
<p>Although we’ve deployed many times before, we learned a lot about automating the full deployment process. This involved handling data between tools and environments. We also learned to use GitHub Actions.</p>
<h2 id="whats-next-for-infrabundle">What’s next for InfraBundle</h2>
<p>InfraBundle currently only works for a subset of Python web apps and the only provider is Google Cloud Platform. With more time, we hope to: - Add more cloud providers (AWS, Linode) - Support more frameworks and languages (ReactJS, Express, Next.js, Gin) - Improve support for database servers - Improve documentation - Modularize deploy playbook to use roles - Integrate with GitHub and Google Cloud Platform - Support multiple web servers</p>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1>{% block title %}Usage{% endblock %}</h1>

{% block content %}
<!--- This usage.md stores the instructions for bundle.zip, put through md to html parser --->
<h2 id="deploy-my-hack-usage">How to use InfraBundle?</h2>
<h1 id="deploy-my-hack-usage">How to use InfraBundle?</h1>
<ol type="1">
<li>Fill out the <a href="{{ url_for('deploy_form') }}">deployment settings</a> form to generate a bundle and extract the downloaded bundle containing deployment scripts</li>
</ol>
Expand Down

0 comments on commit 41b8640

Please sign in to comment.