Date
1 - 2 of 2
Bosh-init Deployment but can't use bosh micro command anymore
Dmitriy Kalinin
inline
On Tue, Aug 25, 2015 at 3:37 AM, Alexander Jones <alex.jones(a)philips.com> wrote: Hello,Awesome. So in other words, I've created a new micro-bosh deployment on AWS with a`bosh micro <blah>` only worked when used with `bosh micro deploy`. It does not care about bosh-init-ed machine. Furthermore, "bosh micro agent" is returning errors.everything in bosh CLI continues to work as expected. bosh micro plugin and its subcommands will not work. - I understand that "bosh micro" command set is supposedly gettingbosh micro CLI plugin was bootstrapping Microbosh (Director VM). bosh-init does that too in a better way. We have only implemented so far 2 commands: deploy and deleted that were clearly necessary and decided to wait for some feedback. We have not introduced bosh-init check-status-command-blah-for-one-machine-created yet. From what I saw that command was getting very little usage, so we wanted to see if anyone would miss it. - Why would I use bosh-init at all, if it prevents the standard bosh_cliAll commands that are in bosh CLI are unaffected. Only micro subcommands are affected since they come from micro CLI plugin. When do you tend to query micro-bosh for its health? I've found myself almost never using that command. Thanks in advance. |
|
Alexander Jones <alex.jones@...>
Hello,
I recently successfully created a new micro-bosh on AWS using the "old style" bosh_cli deployer plugin. That all works fine. But when I tried using bosh-init, it created the micro-bosh director on EC2 just fine, but I'm having some problems getting the micro-bosh status etc... So in other words, I've created a new micro-bosh deployment on AWS with a single-vm using the latest version of bosh-init w/ AWS CPI. However, when I try to run the various types of "bosh micro <argument>" commands, I get "n/a" listed for details (which did not happen before after I used the bosh micro deployer rather than bosh-init). Furthermore, "bosh micro agent" is returning errors. My questions: - Is bosh-init incompatible with the data returned from the bosh CLI, specifically the "bosh micro" sub-commands? Am I missing something, or perhaps doing this wrong, or have a wrong version, etc? - I understand that "bosh micro" command set is supposedly getting deprecated, but ... what is supposed to be used in it's place (given that I can't seem to query the micro-bosh using the standard bosh CLI, as I was able to in the past , after I've used bosh-init to deploy)? - Why would I use bosh-init at all, if it prevents the standard bosh_cli from being able to properly query the micro bosh status? Is there a new or different way I can query the micro-bosh? Thanks in advance. # after the successful bosh-init deployment ubuntu(a)ip-10-99-1-200:~$ bosh status Config /home/ubuntu/.bosh_config Director Name my-bosh URL https://10.99.1.6:25555<https://10.99.1.6:25555/> Version 1.3056.0 (00000000) User admin UUID 66482d68-5eb0-4776-8db5-xxxx CPI cpi dns disabled compiled_package_cache disabled snapshots disabled Deployment not set ubuntu(a)ip-10-99-1-200:~$ bosh micro deployments No deployments ubuntu(a)ip-10-99-1-200:~$ ls -al ./my-bosh/ total 2824 drwxrwxr-x 2 ubuntu ubuntu 4096 Aug 25 10:17 . drwxr-xr-x 16 ubuntu ubuntu 4096 Aug 25 10:15 .. -rw-rw-r-- 1 ubuntu ubuntu 2864461 Aug 25 09:45 bosh.log -rw-rw-r-- 1 ubuntu ubuntu 3207 Aug 25 10:14 bosh_micro_deploy.log -rw-rw-r-- 1 ubuntu ubuntu 1843 Aug 25 10:05 mb.yml -rw-rw-r-- 1 ubuntu ubuntu 1275 Aug 25 09:45 microbosh-state.json -rw-rw-r-- 1 ubuntu ubuntu 3480 Aug 25 09:12 microbosh.yml ubuntu(a)ip-10-99-1-200:~$ # here i try to use the 'new-style' yml file for bosh-init to set my bosh micro deployment # microbosh.yml is the new bosh-init style yml that I used to deploy bosh-init # mb.yml is identical file but in the old style (compatible with bosh micro deploy) ubuntu(a)ip-10-99-1-200:~$ bosh micro deployment ./my-bosh/microbosh.yml network is not defined in deployment manifest ubuntu(a)ip-10-99-1-200:~$ bosh micro status Please choose deployment first # here I use the "old-style" yml file that 1-to-1 corresponds to the 'new-style' yml file for bosh-init # same ip, same deployment name, etc except i created the microbosh with bosh-init instead # this deployment was created with bosh-init, but I'm trying to query it using an old-style yml file ubuntu(a)ip-10-99-1-200:~$ bosh micro deployment ./my-bosh/mb.yml WARNING! Your target has been changed to `https://10.99.1.6:25555<https://10.99.1.6:25555/>'! Deployment set to '/home/ubuntu/my-bosh/mb.yml' ubuntu(a)ip-10-99-1-200:~$ ubuntu(a)ip-10-99-1-200:~$ bosh micro status Stemcell CID n/a Stemcell name n/a VM CID n/a Disk CID n/a Micro BOSH CID bm-cfd3f289-76b6-46d1-9a0d-xxxx Deployment /home/ubuntu/my-bosh/mb.yml Target https://10.99.1.6:25555<https://10.99.1.6:25555/> What's with the "n/a" here? --^ ubuntu(a)ip-10-99-1-200:~$ bosh micro agent ping /home/ubuntu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/agent_client-1.3048.0/lib/agent_client/http_client.rb:58:in `post_json': Authentication failed (Bosh::Agent::AuthError) from /home/ubuntu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/agent_client-1.3048.0/lib/agent_client/http_client.rb:23:in `handle_method' from /home/ubuntu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/agent_client-1.3048.0/lib/agent_client/base.rb:19:in `method_missing' from /home/ubuntu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bosh_cli_plugin_micro-1.3048.0/lib/bosh/cli/commands/micro.rb:293:in `agent' from /home/ubuntu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bosh_cli-1.3048.0/lib/cli/command_handler.rb:57:in `run' from /home/ubuntu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bosh_cli-1.3048.0/lib/cli/runner.rb:56:in `run' from /home/ubuntu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/bosh_cli-1.3048.0/bin/bosh:19:in `<top (required)>' from /home/ubuntu/.rbenv/versions/2.1.6/bin/bosh:23:in `load' from /home/ubuntu/.rbenv/versions/2.1.6/bin/bosh:23:in `<main>' ---===] LOGS (bosh-init deployment) [===--- # this was the output of bosh-init when I ran it , and it created a micro bosh successfully ubuntu(a)ip-10-99-1-200:~/my-bosh$ bosh-init deploy ./microbosh.yml Deployment manifest: '/home/ubuntu/my-bosh/microbosh.yml' Deployment state: '/home/ubuntu/my-bosh/microbosh-state.json' Started validating Downloading release 'bosh'... Skipped [Found in local cache] (00:00:00) Validating release 'bosh'... Finished (00:00:02) Downloading release 'bosh-aws-cpi'... Skipped [Found in local cache] (00:00:00) Validating release 'bosh-aws-cpi'... Finished (00:00:00) Validating cpi release... Finished (00:00:00) Validating deployment manifest... Finished (00:00:00) Downloading stemcell... Skipped [Found in local cache] (00:00:00) Validating stemcell... Finished (00:00:00) Finished validating (00:00:02) Started installing CPI Compiling package 'ruby_aws_cpi/072e24844381cf7aa552a9288dbabe36e774c047'... Finished (00:01:37) Compiling package 'bosh_aws_cpi/a977bbf166f255505f692163e1715d0347a790e7'... Finished (00:01:11) Installing packages... Finished (00:00:01) Rendering job templates... Finished (00:00:00) Installing job 'cpi'... Finished (00:00:00) Finished installing CPI (00:02:50) Starting registry... Finished (00:00:00) Uploading stemcell 'bosh-aws-xen-hvm-ubuntu-trusty-go_agent/3012'... Finished (00:00:10) Started deploying Creating VM for instance 'bosh/0' from stemcell 'ami-f909f9bd light'... Finished (00:00:53) Waiting for the agent on VM 'i-da3cc11f' to be ready...^[[1;5A Finished (00:02:41) Creating disk... Finished (00:00:24) Attaching disk 'vol-180a49e1' to VM 'i-da3cc11f'... Finished (00:00:28) Rendering job templates... Finished (00:00:04) Compiling package 'ruby/c2b6c610123a00a406b66ea4ccd123e24bfcd404'... Finished (00:04:18) Compiling package 'redis/37eae530889cb9ef4e84f9c3d0827bab5ae5cb66'... Finished (00:00:17) Compiling package 'libpq/92c9444b0736e46e3422df1d63739d8ad23dbbae'... Finished (00:00:16) Compiling package 'mysql/e5309aed88f5cc662bc77988a31874461f7c4fb8'... Finished (00:00:10) Compiling package 'genisoimage/008d332ba1471bccf9d9aeb64c258fdd4bf76201'... Finished (00:00:19) Compiling package 'postgres/aa7f5b110e8b368eeb8f5dd032e1cab66d8614ce'... Finished (00:00:06) Compiling package 'ruby_aws_cpi/072e24844381cf7aa552a9288dbabe36e774c047'... Finished (00:01:32) Compiling package 'nginx/1d356bbd17ed8c349fd1053093222d78559687ec'... Finished (00:00:39) Compiling package 'nats/6a31c7bb0d5ffa2a9f43c7fd7193193438e20e92'... Finished (00:00:09) Compiling package 'registry/98b7cf95a1e61cc8737fdbf6ebe00b6140924513'... Finished (00:01:11) Compiling package 'bosh_aws_cpi/a977bbf166f255505f692163e1715d0347a790e7'... Finished (00:01:06) Compiling package 'director/05e32104e08aeacbda4ee6d83e2567cc8206da61'... Finished (00:01:23) Compiling package 'health_monitor/e51e51f2788f47babccfe3dc3b236c4ada5cd97e'... Finished (00:01:00) Updating instance 'bosh/0'... Finished (00:00:11) Waiting for instance 'bosh/0' to be running... Finished (00:00:11) Finished deploying (00:17:26) Stopping registry... Finished (00:00:00) Cleaning up rendered CPI jobs... Finished (00:00:00) ubuntu(a)ip-10-99-1-200:~/my-bosh$ ubuntu(a)ip-10-99-1-200:~/my-bosh$ cat micro_bosh.yml --- name: bosh releases: - name: bosh url: https://bosh.io/d/github.com/cloudfoundry/bosh?v=198 sha1: 8264a5c27e3bbbf182201198445d7c8eb266b8b2 - name: bosh-aws-cpi url: https://bosh.io/d/github.com/cloudfoundry-incubator/bosh-aws-cpi-release?v=28 sha1: c7ce03393ebedd87a860dc609758ddb9654360fa resource_pools: - name: vms network: private stemcell: url: https://bosh.io/d/stemcells/bosh-aws-xen-hvm-ubuntu-trusty-go_agent?v=3012 sha1: 3380b55948abe4c437dee97f67d2d8df4eec3fc1 cloud_properties: instance_type: m3.xlarge ephemeral_disk: {size: 25_000, type: gp2} availability_zone: us-west-1c # <--- Replace with Availability Zone disk_pools: - name: disks disk_size: 20_000 cloud_properties: {type: gp2} networks: - name: private type: manual subnets: - range: 10.99.1.0/24 gateway: 10.99.1.1 dns: [10.99.1.2] cloud_properties: {subnet: subnet-xxxxxxx} # <--- Replace with Subnet ID - name: public type: vip jobs: - name: bosh instances: 1 templates: - {name: nats, release: bosh} - {name: redis, release: bosh} - {name: postgres, release: bosh} - {name: blobstore, release: bosh} - {name: director, release: bosh} - {name: health_monitor, release: bosh} - {name: registry, release: bosh} - {name: cpi, release: bosh-aws-cpi} resource_pool: vms persistent_disk_pool: disks networks: - name: private static_ips: [10.99.1.6] default: [dns, gateway] - name: public static_ips: [xx.xx.xx.xx] # <--- Replace with Elastic IP properties: nats: address: 127.0.0.1 user: nats password: nats-password redis: listen_addresss: 127.0.0.1 address: 127.0.0.1 password: redis-password postgres: &db host: 127.0.0.1 user: postgres password: postgres-password database: bosh adapter: postgres registry: address: 10.99.1.6 host: 10.99.1.6 db: *db http: {user: admin, password: admin, port: 25777} username: admin password: admin port: 25777 blobstore: address: 10.99.1.6 port: 25250 provider: dav director: {user: director, password: director-password} agent: {user: agent, password: agent-password} director: address: 127.0.0.1 name: my-bosh db: *db cpi_job: cpi max_threads: 10 hm: director_account: {user: admin, password: admin} resurrector_enabled: true aws: &aws #access_key_id: ACCESS-KEY-ID # <--- Replace with AWS Access Key ID #secret_access_key: SECRET-ACCESS-KEY # <--- Replace with AWS Secret Key access_key_id: xxxxxx secret_access_key: xxxxxxx default_key_name: ec2-xxxx default_security_groups: [Boshlite-xxx-xxx] region: us-west-1 agent: {mbus: "nats://nats:nats-password(a)10.99.1.6:4222"} ntp: &ntp [0.pool.ntp.org, 1.pool.ntp.org] cloud_provider: template: {name: cpi, release: bosh-aws-cpi} ssh_tunnel: host: xx.xx.xx.xx # <--- Replace with your Elastic IP address port: 22 user: vcap private_key: ../ec2-xx.pem # Path relative to this manifest file mbus: "https://mbus:mbus-password(a)xx.xx.xx.xx:6868<https://mbus:mbus-password(a)xx.xx.xx.xx:6868/>" # <--- Replace with Elastic IP properties: aws: *aws agent: {mbus: "https://mbus:mbus-password(a)0.0.0.0:6868<https://mbus:mbus-password(a)0.0.0.0:6868/>"} blobstore: {provider: local, path: /var/vcap/micro_bosh/data/cache} ntp: *ntp ubuntu(a)ip-10-99-1-200:~/my-bosh$ bosh status Config /home/ubuntu/.bosh_config Director Name my-bosh URL https://10.99.1.6:25555<https://10.99.1.6:25555/> Version 1.3056.0 (00000000) User admin UUID 66482d68-5eb0-4776-xxx-xxxxx CPI cpi dns disabled compiled_package_cache disabled snapshots disabled Deployment not set ubuntu(a)ip-10-99-1-200:~/my-bosh$ ________________________________ The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. |
|