Code Monkey home page Code Monkey logo

memesgen's Introduction

MemesGen

Install k8ssandra per k8ssandra.io

helm install -f k8ssandra.yaml k8ssandra k8ssandra/k8ssandra
watch kubectl get pods

User and pass needed for local testing

kubectl get secret k8ssandra-superuser -o jsonpath="{.data.username}" | base64 --decode ; echo
kubectl get secret k8ssandra-superuser -o jsonpath="{.data.password}" | base64 --decode ; echo

Port forwarding for local access

kubectl port-forward svc/k8ssandra-dc1-stargate-service 8080 8081 8082 9042

Use cqlsh to load memegen.cql statements

kubectl exec -it k8ssandra-dc1-default-sts-0 -- bash -c "wget https://raw.githubusercontent.com/ds-steven-matison/MemesGen/master/memegen.cql -P /tmp && /opt/cassandra/bin/cqlsh localhost 9042 -u k8ssandra-superuser -p [pass above] -f /tmp/memegen.cql"

Role out app

kubectl apply -f deployment.k8s.yaml

Access app locally

kubectl port-forward deployments/memegen-v2  1337:80

After port fwd access app @ http://localhost:1337.

Connect to app container

kubectl exec -it deployments/memegen-v2 /bin/bash

๐Ÿ’ก Use the command tail -f /var/log/php5-fpm.log to check PHP Errors. You can also find the app source at /usr/share/nginx/html.

Create your own dockerhub image

Current Docker image.

  1. Git clone [this repo]
  2. Next build and push image
docker build . -t dsstevenmatison/memegen2
docker push dsstevenmatison/memegen2

โš ๏ธ This sample above is mine, you would change to your dockerhubrepo/appname. Then in the deployment.k8s.yaml file you reference the full docker.io string to image. For example: docker.io/dsstevenmatison/memegen2:latest.

  1. Edit deployment.k8s.yaml accordingly then
kubectl apply -f deployment.k8s.yaml
  1. If you are just updating the image, murder the pod and it will recreate w/ new image
kubectl delete pod memegen-v2-6fd6b955f6-6ldk5

๐Ÿ’ก Monitor your watch kubectl get pods terminal and watch this pod terminate and recreate!!!

Cluster should look like

NAME                                                READY   STATUS      RESTARTS   AGE
k8ssandra-reaper-operator-79fd5b4655-qvgls          1/1     Running     0          152m
k8ssandra-cass-operator-7d5df6d49-pc5cj             1/1     Running     0          152m
k8ssandra-grafana-5c6d5b8f5f-w67fw                  2/2     Running     0          152m
k8ssandra-kube-prometheus-operator-85695ffb-6fpfl   1/1     Running     0          152m
prometheus-k8ssandra-kube-prometheus-prometheus-0   2/2     Running     1          151m
k8ssandra-dc1-default-sts-0                         2/2     Running     0          151m
k8ssandra-reaper-schema-cqgm6                       0/1     Completed   0          148m
k8ssandra-reaper-7bb77d575c-n9sv9                   1/1     Running     0          148m
k8ssandra-dc1-stargate-646d6bcd68-d46rp             1/1     Running     0          152m
memegen-v2-6fd6b955f6-v66xs                         1/1     Running     0          3m45s

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.