Coder Social home page Coder Social logo

grouponeincorporated / acme-infrastructure Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 54.03 MB

IaC project. Deployment of WP + MariaDB in a provisioned K8S cluster.

Shell 33.42% HCL 22.43% JavaScript 34.70% Smarty 8.66% Dockerfile 0.79%
rke ansible k8s terraglue terraform kubernetes docker helm packer openstack

acme-infrastructure's People

Contributors

brocahontaz avatar crazyswe avatar jbarroca avatar scoobis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

acme-infrastructure's Issues

Add README files.

  • Add/fix README with instructions for terraglue script
  • Add README with instructions for Ansible
  • Add README with instructions for ssh config
  • Add README with instructions for rke
  • Add README with instructions for k8s

Fix string bug in glue

snapshot: 'true' should not be a string, but rather only true. Bug in glue to be fixed.

Change ingress-controller namespace

At the moment an ingress controller is deployed with the application deployment, in the same namespace.

This is a solution for using multiple ingress controllers when wanting multiple loadbalancers <=> to get unique floating IPs for each deployment, and a loadbalancer for each namespace.

However, in this instance it might be better using a cluster-wide ingress controller.

This would also help with managing ingress resources for kube-state-metrics and similar.

The cluster-wide ingress-controller could reside in its own namespace, named for example "ingress-controller". It would then handle all ingress resources in all namespaces. And everything would have the same IP.

With this solution we could still have the ingress resource in the namespace for the deployment, to handle traffic to it, and also have an ingress resource for the kube-state-metrics to expose that to the prometheus-server.

Monitoring

Find a suitable monitoring solution, and start implementing it.

Suggestions:

  • Prometheus / Grafana
  • Icinga2
  • ...

Fix relative paths for config files

Add relative paths to the config paths in glue, so it works for everyone regardless of folder structure, without the need of additional config files.

cloud.conf secret

Add cloud.conf secret with cloud credentials.
Preferably encrypted, using for example ansible-vault.

Modify images

Modify/extend the bitnami/wordpress and bitnami/mariadb Docker images to include all necessary data, if possible.

This includes the wp-content folder for wordpress, and the .sql-file needs to be initialized on the mariadb image.

These changes would make sure every deploy starts out the same, and circumvents having to do imports "manually" after deployment.

Nice QoL feature to do when time permits.

Add network rules

Add rules for:

  • Port 80 (http)
  • Port 443 (https)
    to the Terraform script.

Data import

Wordpress + MariaDB are now up and running in a k8s test cluster, with cinder volumes.

The data for plug-ins, posts, etc from the customer needs to be imported in the wp/mdb instances.

Direct WP data is easy through the admin console, but fails due to plug-ins not being added. This data (plug-ins) resides in the database, and needs to be imported first. However, not sure how to do it exactly.

Tried with dB admin plugin in WP, which correctly connects to the db. There's no import function in this plugin, though.

Automate known hosts

Add servers to known_hosts file automatically after running Terraform, as to circumvent manual need for this before running Ansible Playbook (will fail otherwise).

Testrun rke

Testrun rke with current automated cluster.yaml file, and apply eventual needed fixes.

kubeconfig addition

Implement automatic copy of rke-created kubeconfig into .kube/config for kubectl use.

Fix MariaDB chart failure

MariaDB deployment fails with the following error:
"The mariadb configuration file '/opt/bitnami/mariadb/conf/my.cnf' is not writable. Configurations based on environment variables will not be applied for this file."

Needs to be fixed, as a database is needed and wordpress deployment fails due to this.

Fix cluster.yaml

Make sure "labels" and "taints" fields are not written even with empty values for worker nodes in cluster.yaml. This causes error when running rke up.

Must be fixed in glue.

Import files

Files, such as images etc, mainly the wp-content folder that is provided by the customer, needs to be imported into the WP deployment. Possible solution is a volume mount to import. Needs further research on best practice.

These files are of importance to the customer, and as such need to be incorporated into the solution.

Dynamic deploy/destroy

Make deploy-all and destroy-all scripts dynamic. Mainly this applies to the k8s-scripts, to use the correct values-files for each team-member.

Add key reference in ssh_config

Add a reference to the key to be used with the hosts in the ssh_config file to be included in .ssh/config. To be fixed in glue.

Implement cluster essentials

Add needed cluster wide services:

  • Openstack Cloud Controller Manager
  • CSI Cinder plugin
  • K8S Dashboard
  • Cert-manager
    - cluster-issuer
  • nginx-ingress
  • Namespace

Get ingress to work

ATM ingress is not working properly => not routing traffic correctly.

Must get fixed, and working with loadbalancer to provide traffic into the cluster.

Suspect this issue is what causing certificates not to work either, or it is connected in some way at least..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.