Code Monkey home page Code Monkey logo

discourse-on-k8s's Introduction

discourse-on-k8s

It's a tool to build discourse on k8s(adapted to apple silicon system or arm chip)

Why I do this

  1. First, I'm a rookie who's learning k8s and discourse without familiar with ruby. Because both are very popular on current tech-world, and some good products are using them, like tidb-operator or AskTUG.
  2. Second, I‘ve build my blog website focusing on which tech learning, and wanna find out a way to communicate with others people.
  3. Third, my website was running on my macbook-pro-m1, It's also a big challange to make discourse run on Apple Silicon system.

So, I made this tool or repo based on reasons above, furthermore, I know how difficult and wasting-time it does, I wanna simplify it for everyone.

Until now, The architect of my blog is the pic below. As we can see, Running discourse on macbook-M1-chip which is hardly ever been used and, now, I've finished the one.

blog-arch

Quickstart

Actually, I wanna use golang to write a yaml-generater for discourse-on-k8s, So, later I'll update it.

Details-demo

  1. You should install k8s and docker-desktop, firstly, on your mac, and some steps from ChatGPT may help you. More details on the docker website.

  2. Before finish this project, you may wanna build or learn how it implmented. You can do thing below to look more details:

    git clone https://github.com/jansu-dev/discourse-on-k8s.git
    cd discourse-on-k8s/demo
    
    kubectl apply -f volumns.yaml
    kubectl apply -f redis.yaml
    
    # please replace XXX into you own values
    kubectl create secret generic secret --from-literal=dbUsername=XXX --from-literal=dbPassword='XXX' --from-literal=smtpUsername=XXX --from-literal=smtpPassword=XXX --dry-run=client -o yaml > discourse-secret.yaml
    
    kubectl apply -f discourse-secret.yaml
    kubectl apply -f postgres.yaml
    kubectl apply -f discourse.yaml
    
    
    kubectl port-forward psql 5433:5432
    pg_restore -U discourse -d discourse -p 5433 -h localhost discourse.dump -W
    
    sudo kubectl port-forward svc/web-server 80:80

Thanks

  1. Thanks for discourse community and discourse blog, I got the feeling running discourse-on-m1 is possible, and though, a rookie can learn discourse with abundant experiences as fast and easy as eating food.
  2. Thanks for oursky/discourse-k8s, this repo let me know how to implement moving docker into k8s step by step, really appreciate this sharing.
  3. Thanks really for others who already gave many suggestions and experiences, I couldn't finish it without your help.
  4. Thanks for ChatGPT, without you, I couldn't know every implment details to a rookie.

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.