Docker El Capitan

broken image


  • At the time of writing, I had 2.7.11 installed on my machine with OSX El Capitan. After installing XQuartz restart your machine. Install Docker for Mac. Install docker using brew cask install docker or directly from the website here. Start XQuartz from command line using open -a XQuartz. In the XQuartz preferences, go to the.
  • Andrew Foster, 32, and wife Lucy Foster, 28, from Cardiff, were crushed under tons of falling rock at Yosemite. Rockslide on the iconic El Capitan sent a 130ft by 65ft piece of granite tumbling down on them on Wednesday. Andrew was killed, but Lucy was rescued from rubble and airlifted to hospital where she's in critical condition.
  • Docker takes away repetitive, mundane configuration tasks and is used throughout the development lifecycle for fast, easy and portable application development - desktop and cloud. Docker's comprehensive end to end platform includes UIs, CLIs, APIs and security that are engineered to work together across the.

環境

OSX El Capitan
docker Version 1.13.1

Install Docker on El Capitan. GitHub Gist: instantly share code, notes, and snippets.

Docker for Macをインストールする

wordpress用のディレクトリを作る

docker-composeの準備をする

docker-compose.ymlをつくる

container名をつける

上記のようにすることで任意のcontainer名がつけられる。
何も指定しないとwp_wordpress_1・wp_db_1などという名前にされてしまってわかりづらくなるので、指定するのがおすすめ。
dbとWordPressで別々のcontainerが必要になるので、dbの方は末尾に-dbをつけるなどして区別すると良い。

同様にしてnetwork名も明示的につけると良い。

開発を行うディレクトリをcontainerに同期する

Dockerでは、ローカルPCのディレクトリをcontainer内のディレクトリに同期(マウント)できる。このときマウントされる領域を volume と呼ぶ。

ローカル環境でwordpressを編集しながらcontainerに同期させるためには、以下のように記述する。

アクセスポートを変更する

デフォルトで'8000:80'になっているので、すでにlocalhost:8000を使っている場合は変更する。
ポートが重複しているとbuild時にエラーが出てbuildが止まる。
buildが途中で止まってしまったときは、妙なcontainerが出来ていたりするので下記を参照にしてまっさらにしてやり直す。

環境変数は.envにまとめて読み込む

以下のように記述することで外部の.envファイルを読み込むようにできる。

全体のサンプルは下記。

docker-compose.ymlを使ってbuildする

buildのコマンドを叩く

こんな感じのメッセージが出て、wordpressがbuildされる。

imageが作られたことを確認する


※わたしはwordpress 4.7.2-php7.1-apacheも使っているため3つあります。

containerが立ち上がったことを確認する

起動していないcontainerも含めて一覧を見るコマンドはこちら。意図したcontainerが立ち上がっていなかったら、このコマンドでbuildが失敗していないか確認する。

Docker El Capitan

localhost:8000にアクセスして確認する

localhost:{設定したアクセスポート番号}をURLに入力してアクセスすると、WordPressの初期設定画面が出てくる。

何て簡単なのでしょう...!

buildに失敗したとき

関連するcontainerを停止した上に削除する

失敗したconatainerとnetworkが残っていないか確認する

何らかの原因でdocker-compose down -vしても失敗したcontainerや不要なnetworkを削除できないときは、以下のコマンドで対処する。

1.不要なcontainerが存在するが、起動はしていなかった場合

2.不要なcontainerが存在し、起動している場合

3.不要なnetworkが残っている場合

参考にさせていただいた記事

https://docs.docker.com/compose/wordpress/
https://tech.recruit-mp.co.jp/infrastructure/post-11266/
http://qiita.com/muk-ai/items/3350122d9e09473723c6

Ansible Tower (formerly ‘AWX') is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It's designed to be the hub for all of your automation tasks.

Tower allows you to control access to who can access what, even allowing sharing of SSH credentials without someone being able to transfer those credentials. Inventory can be graphically managed or synced with a wide variety of cloud sources. It logs all of your jobs, integrates well with LDAP, and has an amazing browsable REST API. Command line tools are available for easy integration with Jenkins as well. Provisioning callbacks provide great support for autoscaling topologies.

In this tutorial, you'll learn how to install and use it on an existing installation of CentOS 7. 64-bit CentOS 7 Droplet; Non-root user with sudo privileges. A CentOS 7 server set up using Initial Setup Guide for CentOS 7 explains how to set this up. # yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine 2. To install the latest version of the Docker Engine you need to set up the Docker repository and install the yum-utils package to enable Docker stable repository on the system. By default the CentOS 7 official software package repositories have PHP 5.4, which has reached the end of life and no longer actively maintained by the developers.To keep up with the latest features and security updates, you need a newer (probably the latest) version of PHP on your CentOS 7 system. Containers have revolutionized Applications deployment and massive scalability of microservices. Docker was a game-changer, simplifying the process of running and managing applications in containers. This article will guide you through the installation of Docker on RHEL 7. For CentOS 7, check Docker Installation on CentOS 7.

Docker Toolbox El Capitan

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is the upstream project for Tower, a commercial derivative of AWX.

Prerequisites

Before you can run a deployment, you'll need the following installed in your local environment:

  • Ansible Requires Version 2.8+
  • Docker
    • A recent version
  • docker Python module
    • This is incompatible with docker-py. If you have previously installed docker-py, please uninstall it.
    • We use this module instead of docker-py because it is what the docker-compose Python module requires.
  • Git Requires Version 1.8.4+
  • Python 3.6+
  • Node 10.x LTS version
    • This is only required if you're building your own container images with use_container_for_build=false
  • NPM 6.x LTS
    • This is only required if you're building your own container images with use_container_for_build=false

System Requirements

The system that runs the AWX service will need to satisfy the following requirements

  • At least 4GB of memory
  • At least 2 cpu cores
  • At least 20GB of space
  • Running Docker, Openshift, or Kubernetes
  • If you choose to use an external PostgreSQL database, please note that the minimum version is 10+.

Installation steps:

1. Install Dependencies

yum install -y epel-release

yum remove python-docker-py

yum install -y yum-utils device-mapper-persistent-data lvm2 ansible git python-devel python-pip python-docker-py vim-enhanced

pip install cryptography
pip install jsonschema
pip install docker-compose~=1.23.0
pip install docker –upgrade

2. Install docker

Configure docker ce stable repository.

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Installing docker.

yum install docker-ce -y

Install Docker-engine Centos 7

Docker El Capitan Update

Start docker service.

systemctl start docker

Enable docker service.

systemctl enable docker

3. Deploy AWX

Clone AWX repo

git clone https://github.com/ansible/awx.git

Create el capitan install usb. For install the El Capitan on your startup volume, you need to create a bootable USB installer on a separate drive (USB pen drive). Keep A Backup For El Capitan Download Before Installing. You need to choose a good backup tool for backing up the existing OS' files, folders, and applications.

Clone commercial logos

cd awx/

Docker El Capitan Download

git clone https://github.com/ansible/awx-logos.git

Install Docker Engine Centos 7

Configure AWX

cd installer/

$ vim inventory

awx_official=true

Deploy AWX

ansible-playbook -i inventory install.yml -vv

Check the status

docker ps -a

AWX is ready and can be accessed from the browser.

http://ipaddress:80/

the default username is 'admin' and the password is 'password'.

Docker El Capitan

localhost:8000にアクセスして確認する

localhost:{設定したアクセスポート番号}をURLに入力してアクセスすると、WordPressの初期設定画面が出てくる。

何て簡単なのでしょう...!

buildに失敗したとき

関連するcontainerを停止した上に削除する

失敗したconatainerとnetworkが残っていないか確認する

何らかの原因でdocker-compose down -vしても失敗したcontainerや不要なnetworkを削除できないときは、以下のコマンドで対処する。

1.不要なcontainerが存在するが、起動はしていなかった場合

2.不要なcontainerが存在し、起動している場合

3.不要なnetworkが残っている場合

参考にさせていただいた記事

https://docs.docker.com/compose/wordpress/
https://tech.recruit-mp.co.jp/infrastructure/post-11266/
http://qiita.com/muk-ai/items/3350122d9e09473723c6

Ansible Tower (formerly ‘AWX') is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It's designed to be the hub for all of your automation tasks.

Tower allows you to control access to who can access what, even allowing sharing of SSH credentials without someone being able to transfer those credentials. Inventory can be graphically managed or synced with a wide variety of cloud sources. It logs all of your jobs, integrates well with LDAP, and has an amazing browsable REST API. Command line tools are available for easy integration with Jenkins as well. Provisioning callbacks provide great support for autoscaling topologies.

In this tutorial, you'll learn how to install and use it on an existing installation of CentOS 7. 64-bit CentOS 7 Droplet; Non-root user with sudo privileges. A CentOS 7 server set up using Initial Setup Guide for CentOS 7 explains how to set this up. # yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine 2. To install the latest version of the Docker Engine you need to set up the Docker repository and install the yum-utils package to enable Docker stable repository on the system. By default the CentOS 7 official software package repositories have PHP 5.4, which has reached the end of life and no longer actively maintained by the developers.To keep up with the latest features and security updates, you need a newer (probably the latest) version of PHP on your CentOS 7 system. Containers have revolutionized Applications deployment and massive scalability of microservices. Docker was a game-changer, simplifying the process of running and managing applications in containers. This article will guide you through the installation of Docker on RHEL 7. For CentOS 7, check Docker Installation on CentOS 7.

Docker Toolbox El Capitan

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is the upstream project for Tower, a commercial derivative of AWX.

Prerequisites

Before you can run a deployment, you'll need the following installed in your local environment:

  • Ansible Requires Version 2.8+
  • Docker
    • A recent version
  • docker Python module
    • This is incompatible with docker-py. If you have previously installed docker-py, please uninstall it.
    • We use this module instead of docker-py because it is what the docker-compose Python module requires.
  • Git Requires Version 1.8.4+
  • Python 3.6+
  • Node 10.x LTS version
    • This is only required if you're building your own container images with use_container_for_build=false
  • NPM 6.x LTS
    • This is only required if you're building your own container images with use_container_for_build=false

System Requirements

The system that runs the AWX service will need to satisfy the following requirements

  • At least 4GB of memory
  • At least 2 cpu cores
  • At least 20GB of space
  • Running Docker, Openshift, or Kubernetes
  • If you choose to use an external PostgreSQL database, please note that the minimum version is 10+.

Installation steps:

1. Install Dependencies

yum install -y epel-release

yum remove python-docker-py

yum install -y yum-utils device-mapper-persistent-data lvm2 ansible git python-devel python-pip python-docker-py vim-enhanced

pip install cryptography
pip install jsonschema
pip install docker-compose~=1.23.0
pip install docker –upgrade

2. Install docker

Configure docker ce stable repository.

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Installing docker.

yum install docker-ce -y

Install Docker-engine Centos 7

Docker El Capitan Update

Start docker service.

systemctl start docker

Enable docker service.

systemctl enable docker

3. Deploy AWX

Clone AWX repo

git clone https://github.com/ansible/awx.git

Create el capitan install usb. For install the El Capitan on your startup volume, you need to create a bootable USB installer on a separate drive (USB pen drive). Keep A Backup For El Capitan Download Before Installing. You need to choose a good backup tool for backing up the existing OS' files, folders, and applications.

Clone commercial logos

cd awx/

Docker El Capitan Download

git clone https://github.com/ansible/awx-logos.git

Install Docker Engine Centos 7

Configure AWX

cd installer/

$ vim inventory

awx_official=true

Deploy AWX

ansible-playbook -i inventory install.yml -vv

Check the status

docker ps -a

AWX is ready and can be accessed from the browser.

http://ipaddress:80/

the default username is 'admin' and the password is 'password'.

Final checks:

  1. verify whether the service is started or not with ss -tlnp grep 80
  2. make sure your firewall is open for port 80
  3. make sure your OS is using python 3.6+ and pip3

https://github.com/ansible/awx/blob/devel/INSTALL.md





broken image