Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Dockerで始める Java EE アプリケーション開発 for JJUG CCC 2017

7.260 visualizaciones

Publicado el

Goal
* Docker使って Java EE 開発環境のセットアップを楽にする
* JavaエンジニアをとりあえずDockerに入門させ、コンテナ開発/運用時代に備えてもらう

Publicado en: Ingeniería
  • Get Your Ex Boyfriend/husband Back! Don't lose him! Dr.Unity has helped thousands of women get their Ex husband/boyfriend back using his real effective love Spell" I'm Natasha Wanderly form USA. After 12years of marriage, me and my husband has been into one quarrel or the other until he finally left me and moved to California to be with another woman. I felt my life was over and my kids thought they would never see their father again. i tried to be strong just for the kids but i could not control the pains that torments my heart, my heart was filled with sorrows and pains because i was really in love with my husband. Every day and night i think of him and always wish he could come back to me, I was really worried and i needed help, so i searched for help online and I came across a website that suggested that Dr Unity can help get ex back fast. So, I felt I should give him a try. I contacted him and he told me what to do and i did it then he did a Love spell for me. 11hours later, my husband really called me and told me that he miss me and the kids so much, So Amazing!! So that was how he came back that same day,with lots of love and joy,and he apologized for his mistake,and for the pain he caused me and the kids. Then from that day,our Marriage was now stronger than how it were before, All thanks to Dr Unity. he is so powerful and i decided to share my story on the internet that Dr.Unity is real spell caster who i will always pray to live long to help his children in the time of trouble, if you are here and you need your ex lover back or save your marriage fast. Do not cry anymore, contact Dr.Unity now. Here’s his contact,Email him at: Unityspelltemple@gmail.com or Call/WhatsApp him: +2348055361568 ,website:https://unityspelltemples.blogspot.com
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Get Your Ex Boyfriend/Girlfriend Back! Don't lose him! Dr.Unity has helped thousands of women get their Ex husband/boyfriend back using his real effective love Spell" I'm Natasha Wanderly form USA. After 12years of marriage, me and my husband has been into one quarrel or the other until he finally left me and moved to California to be with another woman. I felt my life was over and my kids thought they would never see their father again. i tried to be strong just for the kids but i could not control the pains that torments my heart, my heart was filled with sorrows and pains because i was really in love with my husband. Every day and night i think of him and always wish he could come back to me, I was really worried and i needed help, so i searched for help online and I came across a website that suggested that Dr Unity can help get ex back fast. So, I felt I should give him a try. I contacted him and he told me what to do and i did it then he did a Love spell for me. 11hours later, my husband really called me and told me that he miss me and the kids so much, So Amazing!! So that was how he came back that same day,with lots of love and joy,and he apologized for his mistake,and for the pain he caused me and the kids. Then from that day,our Marriage was now stronger than how it were before, All thanks to Dr Unity. he is so powerful and i decided to share my story on the internet that Dr.Unity is real spell caster who i will always pray to live long to help his children in the time of trouble, if you are here and you need your ex lover back or save your marriage fast. Do not cry anymore, contact Dr.Unity now. Here’s his contact,Email him at: Unityspelltemple@gmail.com or Call/WhatsApp him: +2348055361568 ,website:https://unityspelltemples.blogspot.com
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Get your ex back love spell that works fast. Dr.Unity has helped thousands of women get their Ex husband/boyfriends back using his real effective love Spell" I'm Natasha Wanderly form USA. After 12years of marriage, me and my husband has been into one quarrel or the other until he finally left me and moved to California to be with another woman. I felt my life was over and my kids thought they would never see their father again. i tried to be strong just for the kids but i could not control the pains that torments my heart, my heart was filled with sorrows and pains because i was really in love with my husband. Every day and night i think of him and always wish he could come back to me, I was really worried and i needed help, so i searched for help online and I came across a website that suggested that Dr Unity can help get ex back fast. So, I felt I should give him a try. I contacted him and he told me what to do and i did it then he did a Love spell for me. 11hours later, my husband really called me and told me that he miss me and the kids so much, So Amazing!! So that was how he came back that same day,with lots of love and joy,and he apologized for his mistake,and for the pain he caused me and the kids. Then from that day,our Marriage was now stronger than how it were before, All thanks to Dr Unity. he is so powerful and i decided to share my story on the internet that Dr.Unity is real spell caster who i will always pray to live long to help his children in the time of trouble, if you are here and you need your ex lover back or save your marriage fast. Do not cry anymore, contact Dr.Unity now. Here’s his contact,Email him at: Unityspelltemple@gmail.com or Call/WhatsApp him: +2348055361568 ,website:https://unityspelltemples.blogspot.com
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • love spell to get ex wife/husband back? Don't lose him! Dr.Unity has helped thousands of women get their Ex husband/boyfriend back using his real effective love Spell" I'm Natasha Wanderly form USA. After 12years of marriage, me and my husband has been into one quarrel or the other until he finally left me and moved to California to be with another woman. I felt my life was over and my kids thought they would never see their father again. i tried to be strong just for the kids but i could not control the pains that torments my heart, my heart was filled with sorrows and pains because i was really in love with my husband. Every day and night i think of him and always wish he could come back to me, I was really worried and i needed help, so i searched for help online and I came across a website that suggested that Dr Unity can help get ex back fast. So, I felt I should give him a try. I contacted him and he told me what to do and i did it then he did a Love spell for me. 11hours later, my husband really called me and told me that he miss me and the kids so much, So Amazing!! So that was how he came back that same day,with lots of love and joy,and he apologized for his mistake,and for the pain he caused me and the kids. Then from that day,our Marriage was now stronger than how it were before, All thanks to Dr Unity. he is so powerful and i decided to share my story on the internet that Dr.Unity is real spell caster who i will always pray to live long to help his children in the time of trouble, if you are here and you need your ex lover back or save your marriage fast. Do not cry anymore, contact Dr.Unity now. Here’s his contact,Email him at: Unityspelltemple@gmail.com or Call/WhatsApp him: +2348055361568 ,website:https://unityspelltemples.blogspot.com ,your kindness will never be forgotten.
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Did you know that once you lose your Ex, there is still a good chance you can get them back? Learn how ●●● http://goo.gl/FXTq7P
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí

Dockerで始める Java EE アプリケーション開発 for JJUG CCC 2017

  1. 1. Dockerではじめる Java EE アプリケーション開発 for JJUG CCC 2017 Fall • 齋藤 耕平 (さいとう こうへい) • Twitter : @SightSeekerTw (https://twitter.com/SightSeekerTw) • Qiita: SightSeekerTw (https://qiita.com/SightSeekerTw) • GitHub: sightseeker (https://github.com/sightseeker) • この部屋のハッシュタグ: #ccc_m6
  2. 2. Goal •Docker使って Java EE 開発環境の セットアップを楽にする •JavaエンジニアをとりあえずDockerに入門 させ、コンテナ開発/運用時代に備えてもらう • IDE(統合開発環境) の話はしません • 実は Java EE っぽい話はあまりない • マイクロサービスの話もしません • DevOpsの話も出てきません
  3. 3. Story •エンジニアのPC(開発機)はだいたい1台/人 •担当するプロジェクトが変わる度に 使うツールが変わる • JDKのバージョンが変わる • 使うアプリケーションサーバが変わる • 使うDBMSが変わる •いちいち入れ直したり、複数バージョンの 共存を考えたりしなきゃいけない
  4. 4. 😣 つらい。。
  5. 5. とりあえず 開発機 (PC) に Docker 入れましょう • Docker CE for Mac • https://store.docker.com/editions/community/docker-ce-desktop- mac • Docker CE for Windows • https://store.docker.com/editions/community/docker-ce-desktop- windows
  6. 6. どんな開発環境を作るか • Gradle (最新版) with OpenJDK 8 ビルド環境 • WildFly 10.1.0.Final デプロイ環境 (Java EE サーバ) • MySQL 5.6 データベース
  7. 7. 百聞は一見にしかず (Demonstration) ブラウザで http://localhost:8080/webapp にアクセス
  8. 8. 何が起こったか •コンテナの仮想ネットワークを構築 •Gradle のプロセスが起動するコンテナが起動 •WildFly が起動するコンテナを起動 •MySQL が起動するコンテナを起動
  9. 9. HostOS (macOS/Windows10/Linux) Docker 要はこういうこと /projec t ./ 0.0.0.0:8080 コンテナのディレクトリに ホストOSのディレクトリを マウント 0.0.0.0:3306 Deploy JDBC コンテナのTCPポートを ホストOSのTCPポートに バインド Docker 上に構築された仮想Network 8080 3306
  10. 10. Gradleのコンテナ • Gradleプロセスが動いてるコンテナが立ち上がってる • ホストOSのソースコードが配置されてる ディレクトリがマウントされてる • 今回 実行してる gradle のタスク • (ファイルの変更を検知して) • ビルド : warをパッケージ • デプロイ : cargoプラグインを使ってWildFly にデプロイ
  11. 11. WildFlyのコンテナ •WildFlyのプロセスが動いてるコンテナが起動 する • MySQL の JConnector をインストール済 • MySQL の コネクションプール 設定済 • WildFly の管理ユーザ 設定済 • コンテナイメージ https://hub.docker.com/r/sightseeker/wild fly-deployment-demo/ ※このコンテナイメージだけ自作してます
  12. 12. MySQLのコンテナ •MySQL 5.6 のプロセスが上がるコンテナ が起動する •WildFly のコネクションプールが参照す る •スキーマが作られてる •ユーザ/パスワードが設定されてる
  13. 13. コンテナはどこから来たのか?
  14. 14. コンテナはどうやってつくる? Dockerfile を作成 ビルドするとコンテナイメージというものが作られる docker run コマンドでイメージを指定すると起動する
  15. 15. Dockerfile •どういうコンテナイメージ なのかの定義 •この定義を使ってビルドすると コンテナイメージ ができる •作ったイメージを指定して run すると コンテナが起動する
  16. 16. 今回したWildFlyのDockerfile https://github.com/sightseeker/wildfly-deployment-demo
  17. 17. docker-compose •Docker公式 オーケストレーションツール •docker-compose.yml • どういう構成でコンテナをデプロイするのかの定義 •Desktop版以外ではオプション (Docker CE とは別にインストールが必要) • サーバ環境だと、Swarmモードか、Kubernetes あたり使うのが一般的?
  18. 18. Java エンジニア的にはこんな理解が良いかも Dockerfile クラス定義 (.javaファイル) イメージ コンパイルされたクラスファイル (.classファイル) コンテナ new して インスタンス化 した オブジェクト docker- compose.yml どんな引数でインスタンスをnewするか定義したもの
  19. 19. Story 2 •WildFly のバージョン変えたい
  20. 20. これまでの運用だったら • 運用メンバーのだれか • 新しいWildFlyのバージョンをダウンロード • ダウンロードしたWildFlyの設定を開発向けに設定を変更 • zipなどでアーカイブとしてまとめる • どこかのファイルサーバに配置 • 開発メンバーのみんな • 運用メンバーが作ってくれたアーカイブをダウンロード • ダウンロードしたアーカイブを展開 • 今までつかってたWildFlyを削除するか移動させる • デプロイの設定を変更したり
  21. 21. Demonstration •運用メンバーのだれか • Dockerfileに書いてある WildFlyのバージョンを変更する • 変更を GitHub にコミット •開発メンバーのだれか • 起動するコンテナのバージョンを変更する (docker-compose.yml)
  22. 22. Docker Hub は コミットトリガビルドしてくれる DockerHub Code Change & Commit Automated Builds
  23. 23. やってみて感じたこと • Java の IDE はまだ Dockerフレンドリーじゃない 本当はPCのIDEからコンテナにアタッチして プロセスを実行したい (gradle や mvnコマンドなど) (できると思うが、工夫が必要) • EclipseやNetBeansなどのGUIが起動するコンテナを立ち上げるとい う裏技も無くはないが。。。
  24. 24. Option
  25. 25. Mavenの場合 • Maven には Continuous Build の機構が無いので、 Watcher Plugin を使えば、ファイル変更をトリガにし て、パッケージ/デプロイができる • https://github.com/fizzed/maven-plugins
  26. 26. 作ったイメージを 共有するには • Docker Registry • Dockerのイメージを共有するために、保存しておくところ • Maven や Gradle のリポジトリのようなイメージ • Docker Hub • Docker社公式の、Docker Registry • 自分で Docker Registry を作ることもできる • Docker公式のRegistry (無償の Docker CE だと UI がない) • JFrog Artifactory Pro (有償) • Sonatype Nexus 3 (Free) • Atomic Registry (Free)
  27. 27. The End

×