A template for self-hosting on Oracle's free-tier compute.
Go to file
mharb 726fb502b4 Record new playbook
Use ansible to bootstrap a remote workstation based on Alma Linux. Possibly compatible with fedora.
2024-11-26 12:02:13 -05:00
ansible_playbooks Record new playbook 2024-11-26 12:02:13 -05:00
terraform_plans Add easy way to expose subnet to the public. 2023-10-04 11:06:31 -04:00
.gitignore Initial commit 2023-07-31 14:42:08 +00:00
LICENSE Initial commit 2023-07-31 14:42:08 +00:00
README.md Update documentation. 2023-07-31 10:49:43 -04:00

Oracle Self-Hosted Playground (WIP NOT COMPLETE)

Abstract

In this project we attempt to automate playground provisioning in Oracle Cloud. The playground(s) includes various infrastructure, software, and service deployments. The playground serves as a remote non-production environment.

Requirements

The author(s) assumes the reader has access to Oracle Cloud's free-tier and sufficient IAM permissions. Access to provisioned resources requires an OCI API key and a personal SSH key.

Tooling

  • Ansible >= 7.5.0
  • Terraform >= 1.4.XYZ
  • provider: oracle/oci >= v4.118.0
  • optional: ansible-lint >= 6.16.XYZ

Usage

  1. Install requirements
  2. Configure Cloud Account
  3. Clone repository
  4. Add appropriate ingress rule within network-subnet-public.tf
  5. Generate a .tfvars file using the template tfvars.skel
  • Variables are graciously documented in this repository
  1. terraform init
  2. terraform plan
  3. terraform apply
  4. Add new compute IP address to /etc/ansible/hosts
  5. Update the IP address(es) in nginx.conf to enable 80->443 redirection
  6. Apply the desired playbook

DO NOT STORE SSH KEYS, API KEYS, OR TERRAFORM STATE FILES REMOTELY. PLEASE KEEP THEM SECURE ON YOUR LOCAL MACHINE

Testing and Debugging

Terraform and Ansible provide simple linting and validation functionality. Keep in mind validation or linting does not guarantee a successful deployment.

Terraform

Quickly check your plans: terraform fmt && terraform validate

Ansible

Quickly check your playbooks: ansible-lint yourplaybookfile.yml

"Apps"

  • Self-hosted VS Code
  • Wolfree Alpha mirror
  • Self-hosted CDN with Hitch and Varnish

Attribution

Warning

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

TL;DR: Not my problem

License

The GPL V2 license applies to this project. All copyrights belong to their respective copyright holders and all trademarks belong to their trademark holders.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.)