vfarcic / ms-lifecycle

MIT License
82 stars 68 forks source link

devops 2.0 toolkit book #41

Closed shachardevops closed 4 years ago

shachardevops commented 5 years ago

My name is Shachar and I am struggling with the book because a lot of things are missing For example what is the password for scp haproxy.cfg proxy:/data/haproxy/config/haproxy.cfg vagrant@proxy's password: Permission denied, please try again. Thank you very much for your time 😇

shachardevops commented 5 years ago

another problem on page174 the test fails

[info] Loading project definition from /source/project
[info] Set current project to books-ms (in build file:/source/)
[info] Compiling 2 Scala sources to /source/target/scala-2.10/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.10.6. Compiling...
[info]   Compilation completed in 25.297 s
[info] Compiling 2 Scala sources to /source/target/scala-2.10/test-classes...
[info] ServiceInteg
[info]
[info] GET http://10.100.198.201/api/v1/books should
[info] ! return OK
[error]    ConnectException: : Connection refused (Connection refused)  (NetworkClient.java:175)
[error] sun.net.NetworkClient.doConnect(NetworkClient.java:175)
[error] sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
[error] sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
[error] sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
[error] sun.net.www.http.HttpClient.New(HttpClient.java:339)
[error] sun.net.www.http.HttpClient.New(HttpClient.java:357)
[error] sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1062)
[error] sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1041)
[error] sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:916)
[error] scalaj.http.BaseHttp$$anonfun$apply$8.apply(Http.scala:637)
[error] scalaj.http.BaseHttp$$anonfun$apply$8.apply(Http.scala:637)
[error] scalaj.http.HttpRequest.exec(Http.scala:294)
[error] scalaj.http.HttpRequest.execute(Http.scala:270)
[error] scalaj.http.HttpRequest.asString(Http.scala:484)
[error] com.technologyconversations.api.ServiceInteg$$anonfun$1$$anonfun$apply$2.apply(ServiceInteg.scala:15)
[error] com.technologyconversations.api.ServiceInteg$$anonfun$1$$anonfun$apply$2.apply(ServiceInteg.scala:14)
[info]
[info]
[info] Total for specification ServiceInteg
[info] Finished in 21 ms
[info] 1 example, 0 failure, 1 error
[error] Error: Total 1, Failed 0, Errors 1, Passed 0
[error] Error during tests:
[error]     com.technologyconversations.api.ServiceInteg
[error] (test:testOnly) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 51 s, completed Feb 26, 2019 12:22:41 PM
vfarcic commented 5 years ago

SSH keys should be set inside VMs created with Vagrant and there should be no need for the password. I can try it out over the weekend and let you know whether the problem is reproducible, or you forgot to execute something.

Please note that book is deprecated and pulled out of sales. The tech from that book is too old. We do not do things that way anymore. I removed the book from sales over a year ago. Today, you should focus on Kubernetes, instead of Swarm. Even if you do want to use Swarm, Docker released a standalone version that replaces the one used in the book. On top of that, Terraform is preferable over Ansible, it's easier and better to work locally with minikube or Docker For Desktop than with machines created with Vagrant, and so on. What I'm trying to say is that I would recommend that you do not waste your time with tech that is deprecated. If you're interested in Kubernetes (you should), you might want to check out The DevOps 2.3, 2.4, and 2.5 Toolkit (links are in https://www.devopstoolkitseries.com/). If you do insist on using Swarm, at least jump to the only version supported by Docker. That one is used in The DevOps 2.1 Toolkit.

On Tue, Feb 26, 2019 at 5:30 AM shachar notifications@github.com wrote:

My name is Shachar and I am struggling with the book because a lot of things are missing For example what is the password for scp haproxy.cfg proxy:/data/haproxy/config/haproxy.cfg vagrant@proxy's password: Permission denied, please try again. Thank you very much for your time 😇

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vfarcic/ms-lifecycle/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/AFc5A46YwCEn_tGzrY4mEmKUGr-czsaxks5vRQzOgaJpZM4bR2Zx .

shachardevops commented 5 years ago

thank you

shachardevops commented 5 years ago

what about the nginx and consul should i use traefik ?

vfarcic commented 5 years ago

That depends on what you're planning to do with Consul. K8s, for example, comes with etcd bundled. Similarly, Swarm has its own registry. Mesos comes with Zookeeper. The only good use case for Consul, in the context of container schedulers, is with Nomad, but that one is largely abandoned.

On Tue, Feb 26, 2019, 08:17 shachar notifications@github.com wrote:

what about the nginx and consul should i use traefik ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vfarcic/ms-lifecycle/issues/41#issuecomment-467433802, or mute the thread https://github.com/notifications/unsubscribe-auth/AFc5A3W3SbGw5oSYjv7Yhq1T0jz_O3u7ks5vRTPkgaJpZM4bR2Zx .

shachardevops commented 5 years ago

thank you again :)