- Read the docs https://github.com/jonathan-kosgei/sc-examples. The repo contains sample code in Python, Ruby, Node and PHP.
- Create a new app
- Push code to your app's private git repo.
- Create an addon for your new app. At the moment the available addons include Redis, Mysql, Postgres and Elasticsearch. Support for elasticsearch is experimental.
- Report bugs. Public Issue tracker: https://github.com/jonathan-kosgei/sc-issues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dropbox | |
class dropbox_monitor(NebriOS): | |
#Hourly cron for now, still poking at drips | |
schedule = "0 * * * *" | |
#The script is started by setting "dropbox_monitor_go to true as you suggested which starts the flow, the "code" is to restart the script when the confirmation code is enterd via an email form"" | |
listens_to = ["dropbox_monitor_go", "code"] | |
#class attributes | |
app_key = 'APP_KEY' | |
app_secret = 'APP_SECRET' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@ip-172-1-1-142:~# calicoctl bgp peer show | |
No global IPv4 BGP Peers defined. | |
No global IPv6 BGP Peers defined. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Managing Multiple Environments | |
Terraform in Atlas makes it easy to reuse configurations and manage multiple environments. Common configurations should be written as modules, and then referenced in the main Terraform file for each environment. For example, the usual tree for managing multiple environments is: | |
- prod | |
- main.tf | |
- .terraform | |
- terraform.tfstate | |
- prod.tfvars | |
- qa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jkosgei/php-nginx:v1 | |
MAINTAINER Jonathan Kosgei <[email protected]> | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN wget http://wordpress.org/latest.tar.gz | |
RUN tar xzvf latest.tar.gz;\ | |
rsync -avP wordpress/ /var/www/html/ ;\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
target_branch="production" | |
working_tree="PATH_TO_DEPLOY" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> list2 | |
[5, 5, 5, 5, 5, 4, 4, 2, 1] | |
>>> def insertion_sort(list2): | |
... for index in range(1,len(list2)): | |
... position=index | |
... currentvalue=list2[index] | |
... while position>0 and currentvalue<list2[position-1]: | |
... list2[position]=list2[position-1] | |
... list2[position-1]=currentvalue | |
... position-=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: PersistentVolume | |
apiVersion: v1 | |
metadata: | |
name: pv0001 | |
labels: | |
name: pv0001 | |
type: local | |
spec: | |
capacity: | |
storage: 5Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: mongo-data-pvc | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 5Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1beta1 | |
kind: StatefulSet | |
metadata: | |
name: mongo | |
spec: | |
serviceName: mongo | |
template: | |
metadata: | |
labels: | |
name: mongo |
OlderNewer