GPII / qi-development-environments

P4A Quality Infrastructure Development Environments
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

A few observations on first use #4

Closed SteveALee closed 8 years ago

SteveALee commented 8 years ago

a fresh pair of eyes and all thet.... :)

I haven't got that far yet but wonder if my CI tasks should be prefixed with something so they can be easily identified in the 'dashboard' list. Or are you planing a new column to identify other projects?

avtar commented 8 years ago

the folder name nodejs is not very helpful. Can a better name be found?

The motivation behind this naming scheme is that in the future we want to provide other stacks that people will be able to deploy on their computers to develop or test with. We started with Node.js since its use is prevalent among GPII projects; PHP and Java will most likely be next.

The VM name is also not helpful. Could the project name (in vars.yml) be used in it.

I'm not sure which name you're referring to. Could you please include a line number?

The project name comment in vars.yml could explain what it is used for

Please refer to the Node.js role's defaults/main.yml file for more thorough documentation.

if nodejs_app_git_clone is false, where on earth does it find the project source?

I'll need to refer to this repository's README.md:

"To get started you should copy the contents of the nodejs directory (excluding the README) to the top-level of your application's source code tree."

So the source doesn't need to be fetched since the Vagrantfile and provisioning directory are part of your project's repository.

Example repositories would be:

SteveALee commented 8 years ago

the folder name nodejs is not very helpful. Can a better name be found?

The motivation behind this naming scheme is that in the future we want to provide other stacks that people will be able to deploy on their computers to develop or test with. We started with Node.js since its use is prevalent among GPII projects; PHP and Java will most likely be next

I guessed that was the case but while it makes sense in the context of this repo it may not in our projects. For example we may have other folders with nodejs content.

I suggest you call it something like QI_nodejs or 'CI_nodejs'.

Actually, I assume we can free rename it ourselves in our projects with out issue?

SteveALee commented 8 years ago

The VM name is also not helpful. Could the project name (in vars.yml) be used in it.

I'm not sure which name you're referring to. Could you please include a line number?

Ah I was not clear. When you run the VB control panel the QI VM appears in the list of VMs. The name is obscure to say the least :)

SteveALee commented 8 years ago

if nodejs_app_git_clone is false, where on earth does it find the project source?

"To get started you should copy the contents of the nodejs directory (excluding the README) to the top-level of your application's source code tree."

So the source doesn't need to be fetched since the Vagrantfile and provisioning directory are part of your project's repository.

Hmm we may be speaking at cross purposes. I'm happy that the QI source is included as part of my repo. However my project code must be inside the the VM and I am assuming that it will do a clone to get it? Is that not the case?

SteveALee commented 8 years ago

I felt the readme could do wit ha few tweaks to make things clearer. Perhaps I'll do a PR when I've more understanding

avtar commented 8 years ago

For example we may have other folders with nodejs content.

Just to clarify, you're only copying the contents of the nodejs directory to the top level of your git repository, not the directory itself. Taken from this repository's README:

"To get started you should copy the contents of the nodejs directory (excluding the README) to the top-level of your application's source code tree."

Please take a look at these repos for examples:

If you feel the README's language could use some massaging to better reflect this requirement then please send a PR. The process for contributing to GPII repositories mirrors the one used by the Fluid Project.

When you run the VB control panel the QI VM appears in the list of VMs. The name is obscure to say the least :)

Ah I see. That name is randomly generated by Vagrant.

However my project code must be inside the the VM and I am assuming that it will do a clone to get it? Is that not the case?

By including the Vagrantfile (and the accompanying provisioning directory) you are letting Vagrant share your git working directory with the VM. For more information please refer to the Synced Folders section of the Vagrant documentation.

SteveALee commented 8 years ago

Just to clarify, you're only copying the contents of the nodejs directory to the top level of your git repository, not the directory itself.

Ah yes, my bad

By including the Vagrantfile (and the accompanying provisioning directory) you are letting Vagrant share your git working directory with the VM. For more information please refer to the Synced Folders section of the Vagrant documentation.

Ah, perfect. And that answers my next question too.

Thanks very much.

avtar commented 8 years ago

You're welcome :)

SteveALee commented 8 years ago

Seems the provider .name cane be used to set the VM name. However it starts with the project folder name (once you have the files in the right place, that is).

https://www.vagrantup.com/docs/virtualbox/configuration.html