projectatomic / vagrant-service-manager

To provide the user a CLI to configure the ADB/CDK for different use cases and to provide glue between ADB/CDK and the user's developer environment.
GNU General Public License v2.0
18 stars 16 forks source link

Document Openshift's memory requirements #420

Open coolbrg opened 8 years ago

coolbrg commented 8 years ago

Hi,

It seems that if you don't want to use [recommended Vagrantfiles from ADB](), then you need to specify minimum memory for VM to start openshift properly during vagrant up process.

Steps to Reproduce

Vagrant.configure(2) do |config|
      config.vm.box = 'projectatomic/adb'

      # config.vm.provider "virtualbox" do |v, override|
      #   v.memory = 3072
      # end

      config.vm.network "private_network", ip: "10.1.2.2"
      config.vm.synced_folder '.', '/vagrant', disabled: true
      config.servicemanager.services = "docker, openshift"
end
[vagrant@centos7-adb ~]$ docker images
REPOSITORY                                   TAG                 IMAGE ID            CREATED             SIZE
docker.io/openshift/origin-sti-builder       latest              9967905f0bfa        25 hours ago        539.9 MB
docker.io/openshift/origin-deployer          latest              2df60eda6907        25 hours ago        539.9 MB
docker.io/openshift/origin-docker-registry   latest              3cd0f97ce31a        25 hours ago        374.1 MB
docker.io/openshift/origin-haproxy-router    latest              308fb17809a9        25 hours ago        559.1 MB
docker.io/openshift/origin

[vagrant@centos7-adb ~]$ free -m
              total        used        free      shared  buff/cache   available
Mem:            489         337           5           4         145         102
Swap:             0           0 

Vagrant debug logs

......
 INFO interface: info: Docker service configured successfully...
 INFO interface: info: ==> default: Docker service configured successfully...
==> default: Docker service configured successfully...
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
 INFO ssh: SSH is ready!
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute:  (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG guest: Searching for cap: os_variant
DEBUG guest: Checking in: redhat
DEBUG guest: Found cap: os_variant in redhat
 INFO guest: Execute capability: os_variant [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>] (redhat)
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: grep VARIANT_ID /etc/os-release (sudo=false)
DEBUG ssh: stdout: VARIANT_ID="adb"

DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: grep VARIANT_ID /etc/os-release (sudo=false)
DEBUG ssh: stdout: VARIANT_ID="adb"

DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: sccli openshift (sudo=true)
DEBUG ssh: stdout: Downloading OpenShift docker images
docker pull docker.io/openshift/origin:latest

DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: stdout: docker pull docker.io/openshift/origin-haproxy-router:latest

DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: stdout: docker pull docker.io/openshift/origin-deployer:latest

DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: stdout: docker pull docker.io/openshift/origin-docker-registry:latest

DEBUG ssh: Sending SSH keep-alive...

DEBUG ssh: stdout: docker pull docker.io/openshift/origin-sti-builder:latest

DEBUG ssh: Sending SSH keep-alive...

********************* Error logs below to pay attention **********************
DEBUG ssh: stderr: Job for openshift.service failed because the control process exited with error code. See "systemctl status openshift.service" and "journalctl -xe" for details.

DEBUG ssh: Exit status: 1
 INFO interface: error: The folowing SH comand responded with a non-zero exit status.
Vagrant asumes that this means the comand failed!
scli openshift
Stdout from the comand:
Downloading OpenShift docker images
docker pul docker.io/openshift/origin:latest
docker pul docker.io/openshift/origin-haproxy-router:latest
docker pul docker.io/openshift/origin-deployer:latest
docker pul docker.io/openshift/origin-docker-registry:latest
docker pul docker.io/openshift/origin-sti-builder:latest
Stder from the comand:
Job for openshift.service failed because the control proces exited with eror code. Se "systemctl status openshift.service" and "journalctl -xe" for details.

 INFO interface: error: ==> default: The folowing SH comand responded with a non-zero exit status.
==> default: Vagrant asumes that this means the comand failed!
==> default: scli openshift
==> default: Stdout from the comand:
==> default: Downloading OpenShift docker images
==> default: docker pul docker.io/openshift/origin:latest
==> default: docker pul docker.io/openshift/origin-haproxy-router:latest
==> default: docker pul docker.io/openshift/origin-deployer:latest
==> default: docker pul docker.io/openshift/origin-docker-registry:latest
==> default: docker pul docker.io/openshift/origin-sti-builder:latest
==> default: Stder from the comand:
==> default: Job for openshift.service failed because the control proces exited with eror code. Se "systemctl status openshift.service" and "journalctl -xe" for details.
==> default: The folowing SH comand responded with a non-zero exit status.
==> default: Vagrant asumes that this means the comand failed!
==> default: scli openshift
==> default: Stdout from the comand:
==> default: Downloading OpenShift docker images
==> default: docker pul docker.io/openshift/origin:latest
==> default: docker pul docker.io/openshift/origin-haproxy-router:latest
==> default: docker pul docker.io/openshift/origin-deployer:latest
==> default: docker pul docker.io/openshift/origin-docker-registry:latest
==> default: docker pul docker.io/openshift/origin-sti-builder:latest
==> default: Stder from the comand:
==> default: Job for openshift.service failed because the control proces exited with eror code. Se "systemctl status openshift.service" and "journalctl -xe" for details.
********************* Error logs end **********************
 INFO environment: Released process lock: machine-action-0d6c11da2d5b87ad0bc4d3a281849130
 INFO environment: Running hook: environment_unload
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x000000025c2658>
hferentschik commented 8 years ago

then you need to specify minimum memory for VM to start openshift properly during vagrant up process.

If this is what's required, lets add it. We don't want to use the full Vagrantfile. This is about just using the minimal configuration required. It is actually imo a good thing that we find out these type of details.

So you are saying that the reason the VM did not come up (locally as well as on CI) as part of the test run was the memory setting. No explicit setting => fail, explicit setting => success?

I am wondering whether there is a difference here in whether you start as part of the Cucumber framework or from the command line. The same Vagrantfile as part of the Cucumber test does not start OpenShift. If I then, however, start just the VM (from the build/aruba directory) it would actually work. Just wondering.

coolbrg commented 8 years ago

@hferentschik @LalatenduMohanty I believe its a documentation issue. Any perfect place this can go which is easily visible?

cc @Preeticp

hferentschik commented 8 years ago

I am happy to just add a comment to the feature file. After all for ADB/CDK we have already per default higher values (correct me from wrong here).

Not sure whether there is much more we need to do in the service-manager repo, except maybe adding a note/comment.

coolbrg commented 8 years ago

@hferentschik Note is required for openshift specifically as we assume that vagrant init projectatomic/adb should just work with config.servicemanager.services = 'docker' line. This these two lines are enough for docker but for openshift we need to add minimum memory line too now.

hferentschik commented 8 years ago

Ok, but I guess this is a matter for a developer-bundle then where it should be documented, right?

coolbrg commented 8 years ago

Hi @Preeticp , I will let you to decide the appropriate place to document it.

Since it is more of service-manager specific, I thought better it will be here in this repo as a note only. Or we can keep it both.

Preeticp commented 8 years ago

I think it should be documented in the ADB installation guide as the issue has to do with a minimal vagrantfile and the vagrant init method of starting a vagrant box. @budhrg can you explain further why you say it is more VSM specific? IIRC, the vagrant init projectatomic/adb method was removed from the ADB installation as we wanted users to use the custom vagrantfiles provided by ADB. If the minimal vagrantfile is to be documented, then the vagrant init method will also need to be reintroduced in the docs. @LalatenduMohanty, @praveenkumar could you please clarify our stand on the vagrant init approach.

coolbrg commented 8 years ago

then the vagrant init method will also need to be reintroduced in the docs.

Yes, we need to get clarify it first. The thing is as a developer I prefer to have minimal vagrantfile, like if you see our tests contains minimal Vagrantfile where I found that minimum memory need to be specified.

I would vote for having a separate section for minimal Vagrantfile approach as we are using it in our test suite.

praveenkumar commented 8 years ago

I would vote for having a separate section for minimal Vagrantfile approach as we are using it in our test suite.

I would say not to have any more documentation around it because in our standard documentation which talks about how to get started with ADB/CDK have precious instructions about using specific Vagrantfile for specific case. My understanding is if we create another doc saying that a user can also use minimal Vagrantfile which also need VSM specific edit (like config.servicemanager.services = "docker, openshift") then it will confuse user plus it will make debugging also little hard if someone hit a issue.

Note: Only around VSM because we are using it for CI then just put it in VSM doc so we can reference it but not ADB overall.

@LalatenduMohanty @hferentschik WDYT?

hferentschik commented 8 years ago

TBH, I don't think we really need to do anything here. At least not in vagrant-service-manager. If anything I add a comment to the Cucumber feature file.