Usage:
%li{:class => active_class(:c => 'controller_name',:a => ['action1','action2'],:id => @object.id) }
= link_to some_path do
%i.fa.fa-chevron-circle-right.fa-fw
%span Link Name| kgp () { | |
| kubectl get pods $argv | |
| } | |
| kdp () { | |
| kubectl describe pods $argv | |
| } | |
| kdr () { | |
| kubectl describe rc $argv |
| ####################################### | |
| # Author: Pradeep (itsprdp@gmail.com) # | |
| # Reference: http://semver.org # | |
| ####################################### | |
| namespace :release_version do | |
| @tags = %x[ git tag --sort version:refname ].split("\n") | |
| def current_tag | |
| @tags.last | |
| end |
| module Release | |
| @tags = %x[ git tag --sort version:refname ].split("\n") | |
| @current_tag = @tags.last | |
| @current_version = @current_tag.gsub("v","") | |
| @major, @minor, @patch = @current_version.split(".").map(&:to_i) | |
| def self.tags | |
| @tags | |
| end |
| kind: Pod | |
| apiVersion: v1 | |
| metadata: | |
| name: readonly-pod | |
| spec: | |
| containers: | |
| - name: readonly-pod | |
| image: nginx | |
| volumeMounts: | |
| - mountPath: /etc/secrets |
| #!/usr/bin/env ruby | |
| # Encode .env file values to base64 and create json key values | |
| require 'base64' | |
| require 'yaml' | |
| if ARGV[0] | |
| env = {} | |
| file = File.new(ARGV[0], "r") |
| # Dockerfile | |
| # Using phusion passenger as base image. | |
| # Refer - https://github.com/phusion/passenger-docker | |
| FROM phusion/passenger-ruby22:latest | |
| MAINTAINER Pradeep <itsprdp@gmail.com> | |
| # Set ENV variables | |
| ENV HOME /rubyapp/ |
| # Serve the MySQL database (destination db) | |
| taps server mysql://<user>:<pass>@localhost/<database> user1 pass123 | |
| # Push the schema and the records of the database to destination db | |
| taps push postgres://<user>:<pass>@localhost/<database> http://user1:pass123@localhost:5000 |
| # Init project settings | |
| $ gcloud config set project PROJECT_ID | |
| $ gcloud config set compute/zone us-east1-b | |
| $ export PROJECT_ID=your-project-id-here | |
| # Build docker image and push it to gcr.io | |
| $ docker build -t gcr.io/${PROJECT_ID}/<project-name> . | |
| Then push this image to the Google Container Registry: | |
| $ gcloud docker push gcr.io/${PROJECT_ID}/<project-name> |
| # Building rails-base image for the rubyapp | |
| FROM phusion/passenger-ruby22 | |
| MAINTAINER Pradeep "itsprdp@gmail.com" | |
| # Set correct environment variables. | |
| ENV HOME /root | |
| # Use baseimage-docker's init process. | |
| CMD ["/sbin/my_init"] |