Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Tips / DevOp

DevOp

DevOp Container Docker Kubernetes

what is devops a-short-guide-to-using-docker-for-your-data-science-environment

Docker on AWS Dockerize Acceptance Tests Kubernetes Guide for Docker Swarm Users Docker Remote Interpreter using PyCharm Jenkins and Kubernetes with Docker Desktop

Deploying Frontend Applications

PyPI Container eea.docker.plone

# Learning Docker p.12
$ sudo docker pull busybox
$ sudo docker images
$ sudo docker run busybox echo "Hello World"
$ sudo service docker status
# /var/log/upstart/docker.log
$ sudo docker run -t -i busybox:ubuntu-14.04
$ sudo docker pull thedockerbook/helloworld
$ sudo docker pull egistry.example.com/myapp

$ sudo docker search mysql

-t 啟動 Terminal 方便互動設定

$ sudo docker run -t -i -p 8090:8080 marr/plone:v500 /bin/bash
docker run -d -p 8080:80 -h pypi.local -v /shares/pypi:/srv/pypi:rw --name pypi docker.io/codekoala/pypi:latest
chcon -Rt svirt_sandbox_file_t /shares/pypi
updated ~/.pypirc to reflect the internal server

port 對應方式的討論

 $ sudo docker login
Username: marr
Password:
Email: ooxx@xyz.com
WARNING: login credentials saved in /home/user/.docker/config.json
Login Succeeded
$ sudo docker push marr/plone
The push refers to a repository [docker.io/marr/plone] (len: 1)
...
v500: digest: sha256:....
635d6 size: 58915

run vs exec

Plone 範例 預設已包含 ZeoServer 執行形式 IMIO Example Storage Location Settings docker-compose-setup UnifiedInstaller help script: su-exec tiny

Remove Image Container Volumn

Makefile Example jupyter with Nix Ubuntu 12.04 測試 http://datakurre.pandala.org/2015/07/building-docker-containers-from-scratch.html 產生下列錯誤

Error: Error downloading extends for URL https://dist.plone.org/release/5-latest/versions.cfg: (SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),)

Dockerfile LABEL 協助標示 ENTRYPOINT & CMD

Docker Compose for Local Development

DockerFile for Plone

Windows + WSL

Data Storage

Data Volume 依開發或服務模式來設定

Image

A Docker Image is a collection of all of the files that make up a software application. The base image does not have any parent. The name 'latest' is used if no specifying. The easiest way of thinking about a container is as the read-write layer that sits on one or more read-only images. A Docker Layer could represent either read-only images or read-write images. However, the top layer of a container stack is always the read-write layer, which hosts a Docker Container. A Docker Registry is a place where the Docker Images can be stored in order to be publicly found, accessed, and used by the worldwide developers.

clair: Check Images for Vulnerabilities

testthedocs: ttd-textlint Linting Tool for Text as Container

Application Health Check with Golang and Multi-Stage Docker Build

react AWS fargate

Adding Kubernetes Deployment and Scaling to a Dockerized Loopback App

Proxy with Application Docker Using IPtable and Redsocks

Kubernates

project calico

app example understanding-kubernetes-value kubernetes-flat-nat-less-networking

Ansible

AttributeError Relationalist Object Has no Attribute source

ansible-playbook SSL Configuration Kubernetes implements health checks using readiness and liveness probes. A readiness probe is used to determine if a Pod can serve traffic. Failure of a readiness probe would result in the Pod being removed from the Endpoints that make up a Service, resulting in the Pod not being routed any traffic until the readiness probe succeeds. A liveness probe, on the other hand, is used to indicate if a service is responsive or if it’s hung or deadlocked. The failure of a liveness probe results in the kubelet restarting the individual container. health-checks-in-distributed-systems

成本效益

導入 Docker 不完全是為了節省成本,而是簡化管理流程。早期可以是用 Elastic Beanstalk 再 Opsworks + Docker 最後全用 Docker 再改成 ECS + Spot,對於不重要的測試環境就全部用 Spot。

Benjamin Cheng: 同樣開一台 8G 與 2G 的 instance 來比,記憶體給 OS 或是 Opsworks 這些服務的用量是差不多的,假設這些東西加起來需要 1G,兩台 8G 的機器就可以擠出 14G 的可用記憶體,換成 2G 機器需要 14 台,總費用來看 8G x 2 會比 2G x 14 省。

for Data Science Env -- Approach A : Start with a base linux distro of your choice Approach B : Use an already available image with all your tools installed