zenoss / zendev Goto Github PK
View Code? Open in Web Editor NEWZenoss development environment, take 2
License: Other
Zenoss development environment, take 2
License: Other
Cleanup to feature/cluster branch required before merging:
sudo apt-get update
right before the apt-get install -y lxc-docker command otherwise it wont find the package.
Need to prefer closer matches. difflib.get_close_matches() is probably the way to do it.
Ubuntu 14.04
Docker 1.0
Increase limits in /etc/security/limits.conf
Still refers to "resetserviced", among other things.
SSH in to a box (without -X), source .bashrc, and run: zendev use foo. When you perform sync (and some repos auth over ssh) you get prompted for the passphrase of the ssh key.
==> Cloning repositories
==> All repositories are cloned!
==> Checking for remote changes
Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter p
assphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphra
se for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for
key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/h
ome/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dga
rcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.s
sh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_rsa': Enter passphrase for key '/home/dgarcia/.ssh/id_r
To workaround this issue an ssh-agent must be started see: http://mah.everybody.org/docs/ssh
When I create a cluster and try to run serviced on a VM using 'zendev serviced', zenoss will not run. It seems the uid/gid on the global.conf is set to the zenoss user in the VM, not the container.
zenoss@foo01:~/dev$ serviced service attach zenping
bash-4.2# ls -l /opt/zenoss/etc/global.conf
-rw-rw---- 1 900 900 639 Nov 19 14:39 /opt/zenoss/etc/global.conf
bash-4.2# id zenoss
uid=1000(zenoss) gid=1000(zenoss) groups=1000(zenoss)
bash-4.2# exit
exit
zenoss@foo01:~/dev$ id zenoss
uid=900(zenoss) gid=900(zenoss) groups=900(zenoss),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),109(lpadmin),110(sambashare),999(docker)
In the logs I can see the following:
I1119 14:39:48.095270 00001 controller.go:226] Wrote config file /opt/zenoss/etc/global.conf
I1119 14:39:48.103532 00001 controller.go:197] Successfully ran command:'&{/usr/bin/chown [chown zenoss:zenoss /opt/zenoss/etc/global.conf] [] <nil> [] <nil> 0xc2080e06a0 exit status 0 ?reflect.Value? true [0xc20804c0b8 0xc20804c0d8 0xc20804c0d8] [0xc20804c0b8 0xc20804c0d8] [0xc20804c0d0] [0x6b1e00] 0xc2080c40e0}' output:
I1119 14:39:48.112093 00001 controller.go:197] Successfully ran command:'&{/usr/bin/chmod [chmod 660 /opt/zenoss/etc/global.conf] [] <nil> [] <nil> 0xc2080e0b20 exit status 0 ?reflect.Value? true [0xc20804c198 0xc20804c1b8 0xc20804c1b8] [0xc20804c198 0xc20804c1b8] [0xc20804c1b0] [0x6b1e00] 0xc2080c4230}' output:
'zendev add' does not provide success/failure feedback. As a result the user cannot tell if the add was successful.
$ zendev add nonexistent.manifest.json
$ echo $?
0
got
kernel: [ 608.236848] init: docker main process ended, respawning
kernel: [ 608.451873] init: docker main process (4230) terminated with status 1
kernel: [ 608.451906] init: docker main process ended, respawning
kernel: [ 608.676417] init: docker main process (4280) terminated with status 1
kernel: [ 608.676445] init: docker respawning too fast, stopped
trying to start docker service,
to fix this, you need to install apparmor at step 3)
$ sudo apt-get install apparmor
As a remote I have had zendev timeout and serviced keep running in the background while serviced is pulling something from the vpn or upstream. 60s is too short.
The following errors occurs when running zendev box create --type ubuntu europa
with VAGRANT_DEFAULT_PROVIDER=vmware_fusion
.
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Box 'ubuntu-13.04-docker-v1' could not be found. Attempting to find and install...
default: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
default: Box Version: >= 0
==> default: Adding box 'ubuntu-13.04-docker-v1' (v0) for provider: vmware_desktop, vmware_fusion, vmware_workstation
default: Downloading: http://vagrant.zendev.org/boxes/ubuntu-13.04-docker-v1.box
The box you attempted to add doesn't match the provider you specified.
Provider expected: vmware_desktop, vmware_fusion, vmware_workstation
Provider of box: virtualbox
The provider for this Vagrant-managed machine is reporting that it
is not yet ready for SSH. Depending on your provider this can carry
different meanings. Make sure your machine is created and running and
try again. Additionally, check the output of `vagrant status` to verify
that the machine is in the state that you expect. If you continue to
get this error message, please view the documentation for the provider
you're using.
Easy enough to work around, but I do use Fusion as my default provider for Vagrant.
The error message looks like this:
ZENDEV: Environment 'X' is not defined
where X is the name of the first zendev env that is dropped.
serviced requires the cgroups-lite package to be installed so that the correct lxc-groups are created at boot time.
The following sequence will yield a stack trace:
$ zendev add some_legitimate_manifest.json
$ zendev status
The problem can be resolved by
$ zendev sync
In bootstrap.sh no temp file is created for the ls and drop commands so that sourcing the temp file raises an error and abort the script in some environments where set -e
is executed, e.g., Jenkins build jobs.
zendev build serviced
needs to exist.
It's hardcoded to 5 seconds. We should have checks.
The ubuntu box needs to have docker login credentials for zenossqa and quay.io in order to build/run
diff --git a/makefile b/makefile
index e88340d..6c130c4 100644
--- a/makefile
+++ b/makefile
@@ -106,6 +106,7 @@ devimg: $(SRCROOT)
-v $$ZENHOME:/opt/zenoss
-v $$SRCROOT:/mnt/src
-v $$PWD:/mnt/build \
-v $$HOME/.m2:/home/zenoss/.m2 \
-w /mnt/build \
-e SRCROOT=/mnt/src \
zendev/devimg /bin/bash -c "exec /tmp/install_core.sh"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.