Code Climate
by Imre Farkas
Hi,
Yesterday I came across a new service called Code Climate which provides
code metrics based on static analysis of the code. It is only for Ruby
and it's free for opensource projects. I added Conductor and it gave the
result back in a minute. You can check them at:
https://codeclimate.com/github/aeolusproject/conductor
It also has an activity feed which is now empty but as soon as new
commits will be added to Conductor it will be evaluated and will appear
in the feed. You can subscribe to it via RSS or we you can receive
updates via email. By doing that you will receive immediate feedback of
your code.
I think it's a pretty awesome service and I would like to take one step
further. Ideally, we could use this site with the intent to improve our
code quality. Currently, a huge part of our business logic is
concentrated in a few classes. It's already causing headaches for us and
it will just get worse. Martin also wrote about the need to refactor
certain parts of our codebase [1], with which I completely agree.
To handle this issue we could allocate a small portion of every sprint
from now on to refactor the worst part of Conductor. Using Code Climate,
we can identify hot spots easily (not that it would be hard on our own)
and we will receive instant feedback on our effort.
What do you think?
Imre
[1]
https://lists.fedorahosted.org/pipermail/aeolus-devel/2013-January/013695...
10 years, 2 months
RFC: Template Versions and Tim Resource Renaming
by Martyn Taylor
RFC: Template Versions and Naming Consistencies
I should have probably written this as two separate emails but since
both points are intertwined I thought it be better to discuss together.
*Background*
At the moment Tim templates are completely immutable. This means making
a simple change to a template requires creating a completely new
template. The original thinking here was that templates could be cloned,
edited then saved, so would not have had large user overhead. However,
since templates are the top level object in Tim. i.e. Template has many
Base Images and so on. It meant that images created from differening
templates (even if they were cloned) were not related in any way making
it difficult to track changes in both templates and images.
/*A rather contrived example might be:*/
User Bob wants launch an instance of his image in EC2. If there is
already an image in ec2 with my Bobs application > version 1.0 then use
that. Otherwise he wants to build a new image based on the most recent
template. Since the templates are not related in anyway it makes it
difficult to do this.
*Template Versions*
Adding in the concept of Template Versions allows a user to create a
master template. This template can be edited as many times as the user
wants. Each time a change is made the user can snapshot it and create a
Template Version. This is then timestamped, versioned and asscoated with
the master template. The template version is then used to create Image
Versions. This allows users to track changes in templates and use
specific images of particular template versions. In the scenario above,
we could easily check the Template Versions for the presence of
Application V1.0 in EC2. If it exists lauch it otherwise create a new one.
*New Model and Rename*
In addition to adding Template Versions we should make the naming of
components consistent across projects. This means renaming some of the
existing models in Tim. See the diagrams below. The Base Image is now
renamed to Image (the naming here is up for grabs as long as it dpoes
not conflict with Factory). Image Version is now named to Base Image
(since it is related to Factory::BaseImage)
Tim Resource Model
Scenarios:
*
As an Application Designer I want to create Templates
*
As an Application Designer I want to create a new /version/ of an
existing Template.
*
As an Infrastructure Consumer I want to build and deploy Images
based on a particular Template.
*
As an Infrastructure Consumer I want to view which Template an Image
was built from.
*
As a Infrastructure Consumer I want to guarantee equivalence
(packages/versions) across Target and Provider Images.
*
As an Infrastructure Consumer I want to create a deployable that
references a specific target image.
*
As an Infrastructure Consumer I want to create a deployable that
references the target image build of a specific template version.
*
As an Infrastructure Consumer I want to create a deployable that
references the most recent version of a template.
10 years, 2 months
ProvidersController and available_providers
by Matt Wagner
Hi fellow developers,
I just sent a pull request[1] removing the "available_providers" filter we
had in the load_providers_types[2] method. I wanted to send this email
in case I was overlooking a reason why this code was actually necessary,
since I don't totally understand its role.
It always seemed odd and/or broken to me. I guess the idea was that we
could support all providers possible upstream, but that the product
shipped might want to remove some untested providers or whatnot. That
seems like a reasonable concern, but:
a.) The line is unchanged between upstream master and 1.1, so we're not
actually _doing_ this in product.
b.) The logic doesn't belong in the middle of a controller.
If we ever find the need to add this functionality, I would propose that
it should be a named scope on the model or something along those lines.
This pull request isn't academic, though -- this filter was getting in
my way when I corrected 'Openstack' to 'OpenStack'. There are ways
around it (checking for both spellings in the controller, or creating
the most pedantic migration ever), but I think the best course of action
is to remove this code, not to add more code to work around it.
But again, I'm sending this out because I'm not entirely sure I
understand the code. I'm not really sending this out to collect +1's or
to start a discussion on what the best way to implement this (unused)
code would be; just to let anyone object if I'm overlooking a reason
that this code can't just be deleted.
-- Matt
[1] https://github.com/aeolusproject/conductor/pull/352
[2] That method name looks like a typo. Shouldn't it be
"load_provider_types"?
10 years, 2 months
Upcoming Sprint Deadline -- Be Informed!
by steve linabery
Hi Aeolus developer community!
Today is Day 7 of the current 2013-Jan:1 Sprint.
That means that Pull Requests for this Sprint's feature work are expected to be in by Monday, 21-Jan.
You should also conscript a reviewer for your Pull Request by that date. If you're having trouble finding a reviewer, reach out for help!
Thank you for your help in getting the Sprint work ready to pass to QE.
--Steve|eggs
10 years, 2 months
[ANNOUNCE] Incubator project releases.
by Jason Guiditta
I recently pushed 2 aeolus-incubator projects to rubygems.org,
changelogs for each listed below. Each release is also tagged in
github in the format v#{release_number}.
-j
==== BundlerExt 0.3.0 =====
Jason Guiditta (2013-01-15)
- a3c5a07 Version bump and changelog.
Jason Guiditta (2013-01-14)
- ef5b599 Change to MIT license and minor cleanups.
Jason Guiditta (2013-01-11)
- 5091ae3 Flatten namespace, since this is now used outside of Aeolus project.
==== Tim 0.2.0 =====
Jason Guiditta (2013-01-16)
- 4e2a139 Bump version to 0.2.0
Jason Guiditta (2013-01-16)
- 7a8b29b Since we no longer keep Gemfile.lock in git, ignore it.
Jason Guiditta (2013-01-15)
- 2aa0d5a Relax Rails version requirement.
Jason Guiditta (2013-01-10)
- 27c49f7 Update Tim to use Rails 3.2.11.
Martyn Taylor (2012-12-19)
- 2967e95 Added methods for returning imgfac request data
Martyn Taylor (2012-12-18)
- cc23b95 Set status on import and snapshot images
Jan Provaznik (2012-12-18)
- d993a34 Fixed passing provider param to imagefactory
Jan Provaznik (2012-12-18)
- b80c020 Fixed setting of external_image_id returned by imagefactory
Jan Provaznik (2012-12-18)
- de17d9b Fixed reloading of decorators and patches
Jason Guiditta (2012-12-06)
- f2c45f1 Add rpm packaging and build script
Martyn Taylor (2012-12-17)
- 99f90b2 Return custom Exception on Factory Connection Refused
Martyn Taylor (2012-12-16)
- f0437af Enforce equivilence for Target Images with same Image Version
Martyn Taylor (2012-12-16)
- 6e56af5 Renamed factory provider account id
Jan Provaznik (2012-12-14)
- 3274813 Fixed flash message in provider images controller
Jan Provaznik (2012-12-14)
- b1a5b05 Removed protect_from_forgery before_filter
Martyn Taylor (2012-12-11)
- 5c68ef5 Load Rails Patch
Martyn Taylor (2012-12-10)
- c6e5e22 Added Imagefactory Snapshot building functionality.
Martyn Taylor (2012-12-04)
- b7de73f Added respond_options to controllers
Jason Guiditta (2012-12-07)
- 882a158 Remove files we don't want to end up n the released gem.
Jan Provaznik (2012-12-03)
- 7f9b2f3 Added os method to Template model
Martyn Taylor (2012-11-28)
- 7249c59 Catch XML Syntax Error exceptions in Template
Jason Guiditta (2012-11-21)
- 749ee96 Fixes to enable rpm packaging.
Jan Provaznik (2012-12-03)
- 1845bf4 Added os method to Template model
Martyn Taylor (2012-11-30)
- d1b4915 Fixed Rails Bug in Monkey Patch
Martyn Taylor (2012-11-29)
- 041c3e0 Added Validation to Models
Martyn Taylor (2012-11-29)
- edd94e1 Added inverse associations
Martyn Taylor (2012-11-28)
- b0873f9 Catch XML Syntax Error exceptions in Template
Martyn Taylor (2012-11-23)
- 2d6caa7 Included Import Example in README
Martyn Taylor (2012-11-16)
- e0fd95c Added Image Import Ability
Jan Provaznik (2012-11-19)
- 65c84f2 Fixed checking if image/template is already set on new action
Martyn Taylor (2012-11-15)
- 197a5f4 Updated README for existing Template on BaseImage create
Martyn Taylor (2012-11-15)
- 53303f5 Added Filter to fix Rails API resource id usage
Martyn Taylor (2012-10-10)
- 51976e1 Updated BaseImage and Templates API Readme
10 years, 2 months
RFC: Renaming
by jzigmund@redhat.com
Hi,
as you could notice on the mailing list we've reconciled names (upstream
- production) and we propose these names [1].
* What will be renamed ?
These strings will be refactored:
Image Template -> Component Outline
Deployable -> AppForm Blueprint
Deployment -> AppForm
Pool Family/Environment-> Cloud Environment
Pool -> Resource Zone
Provider -> Cloud Provider
* Where do we need to rename them ?
- Models, Controllers and Views (and their directory names)
- Used strings(i.e variable names, translations etc) in MVC
- Routes
- API (Controllers, Views)
- All tests (includes RSpec examples, Cucumber features, Factories, VCR)
- Javascript codes, other utils
- building specs
* What use to refactor them ?
I found gem rails_refactor[2]. I has never used it before, but what I
tested and it seems that it handles only renaming model and
creating/deleting new/old files with new/old name.
My best approach is using some IDE (I'm using RubyMine[3]), that
supports Refactoring.
* Prerequisitions ?
Before we start to refactor names, after talking with Brno mates, we
should have pushed these patchsets:
- TIM integration
- Gettext conversion
If those patchsets cause blocker to start refactor (it means that they
wont be pushed in master), we could create a separated branch for
refactoring.
* How to proceed with refactoring?
I propose to create a patchset(for every model/class), that will contain
all refactored files (mentioned in part 'Where do we need to rename
them?')
+ create new migration files to create tables for new named models,
move data from old tables to new ones, and delete old tables.
If you have any ideas to improve the renaming process or you find some
forgotten information, please reply.
Sources:
[1] https://dl.dropbox.com/u/5095754/AeolusGlossary.pdf
[2] https://github.com/jcrisp/rails_refactor
[3] http://www.jetbrains.com/ruby/
--
Jozef
10 years, 2 months
Pushing the Configuration data whenever a Guest OS Starts
by Kalirajan M
Hi All,
I am using CloudForms 1.1 version and checking whether i can reconfigure
(ex: Copying a updated war file into it after first time startup) . Now
whenever I am rerunning audrey agent in the guest, it is checking with the
CS , but not getting the updated file or parameters passed.
Now when i edit this configuration details in the instances configuration
folder
(/var/lib/aeolus-configserver/configs/instances/7933c7b0-5fd8-11e2-b0fd-0025b500005f/)
these details are moving to the guest operating system. However it should
be an easy way (like if the desired file time stamp or version number
changed(in the CS) it should be copied(updated ) automatically in the
guest machine.
Apologies if I am not clear.
Edits done in the tar file within the instance folder(Changes done thru
this file are getting updated in the guest machine)
[root@vmwcfg 7933c7b0-5fd8-11e2-b0fd-0025b500005f]# zcat
7933c7b0-5fd8-11e2-b0fd-0025b500005f.tgz
tomcat/0000755000026400002640000000000012075763675011727 5ustar
aeolusaeolustomcat/test.txt0000644000026400002640000000001412075763675013442
0ustar aeolusaeolushello again
tomcat/start0000755000026400002640000000060112075510503012763 0ustar
aeolusaeolus#!/usr/bin/python
import os
import subprocess
import shutil
# stop firewall (aws starts it automatically)
subprocess.call(["/sbin/service", "iptables", "stop"])
# make selinux permissive
subprocess.call(["/usr/sbin/setenforce", "0"])
# Starting Tomcat Service
subprocess.call(["/sbin/service", "tomcat6", "start"])
shutil.copyfile('test.txt', '/var/lib/tomcat6/webapps/test.txt')
Thanks,
Kalirajan Muthuswami
Tata Consultancy Services
Ph:- 9940631939
Mailto: kalirajan.m(a)tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
10 years, 2 months
IMHOs on the API
by Martin Povolny
While I am at the writing mood today I would like to say a couple of
things to the API. All these are IMHOs so let's pretend there's a IMHO
in front of each point.
i) the API implementation should start with what the consumer needs or
wants
1) the client would want to start with launching things (deployment)
2) next the client would want to check if the thing he wanted to run
actually runs
3) next the client may want something else like list all the stuff he
has
ii) the API needs a client to check it's actually good
I already wrote in a different thread that freezing the API before
verifying that it's actually usable by having at least one client is not
a good idea. In our project probably the first client is the CLI.
iii) the API structure need not copy the internal structure of the
project (being it the models or the controllers)
Actually the API should hide the implementation details as much as
possible and it should be structured in a way that is logical from the
consumer point of view.
iv) from the above it's obvious that having the API in the same
controllers that serve the WUI might not always be the best way to do
not only in terms of spaghetti popularity.
These are just IMHOs, but thanks for reading up to this point!
--
Martin Povolny <mpovolny(a)redhat.com>
tel. +420777714458
10 years, 2 months