Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install and enable Carapace theme #700

Closed
dannylamb opened this issue Aug 22, 2017 · 22 comments
Closed

Install and enable Carapace theme #700

dannylamb opened this issue Aug 22, 2017 · 22 comments
Assignees

Comments

@dannylamb
Copy link
Contributor

Add https://github.com/Islandora-CLAW/carapace to the list of modules to be installed in Drupal: https://github.com/Islandora-Devops/claw-playbook/blob/master/inventory/vagrant/group_vars/webserver/drupal.yml#L19

@jonathangreen
Copy link
Contributor

My vote is that it is pulled in through composer.

@dannylamb
Copy link
Contributor Author

@jonathangreen I agree, but we need to sort out how that will happen. If the drupal role we're using doesn't support it, then we'll need to implement it ourselves.

@DiegoPino
Copy link
Contributor

@dannylamb @jonathangreen there will be moments and places where we will be still be using drush. Not everything can come via composer, probably the theme itself can, and some dependencies). Enabling of and setting as default(e.g drush config-set system.theme default carapace)

@dannylamb
Copy link
Contributor Author

@DiegoPino Yeah, for sure. Composer is just for pulling down code with its dependencies.

@bryjbrown
Copy link
Member

@dannylamb To be installed via composer, does carapace have to be on packagist.org, or can composer install it from GitHub?

@dannylamb
Copy link
Contributor Author

@bryjbrown Either, though in practice we've found putting it up on packagist to be easier. Just using Github then spams their API, and you have to pass in an extra authentication key to prevent from getting throttled.

@dannylamb
Copy link
Contributor Author

@jonathangreen Upon inspection it looks like the drupal role is geared towards building from a composer project, so looks like we add it to https://github.com/Islandora-CLAW/drupal-project to get the code pulled down and also add it to https://github.com/Islandora-Devops/claw-playbook/blob/master/inventory/vagrant/group_vars/webserver/drupal.yml#L19 to get it enabled.

I'm not sure what we'd need to do to set it to default, or if that's even required. But those two things would be a good start once carapace is on packagist.

@jonathangreen
Copy link
Contributor

@dannylamb does it make sense to add it to drupal-project? We probably don't want to require that theme in order to use drupal project do we?

Depending on the answer to that question we could add an additional variable to the webserver-app role with packages to have composer install... I don't think that would be too hard, and would be a potentially useful variable to have. The biggest thing would be doing the work to make sure its idempotent.

@DiegoPino
Copy link
Contributor

@jonathangreen are you thinking about adding those with specific versions or just the package name?

@jonathangreen
Copy link
Contributor

@DiegoPino either really 😄. I think behind the scenes it would be two composer calls, one to see if the package is already installed and another to install it if not. Instead of the first one call maybe we could look at the composer.json within Ansible. Have to see if anyone else is doing something like that, or if there is an easier way.

If we are just passing the variable off to composer we can probably allow version numbers with the package name, the same way composer does. That would let us not specify version numbers for now, but specify them later when we want to.

This may be all overthinking, and we should just add everything to drupal-project, I'm not sure. Thoughts?

@DiegoPino
Copy link
Contributor

@jonathangreen i like 2x calls approach. Like a composer info and then the actual require call. 👍

@dannylamb
Copy link
Contributor Author

@jonathangreen @DiegoPino Iterating over a list of them and composer requiring sounds good to me. It'd be nice to have the flexibility in the playbook instead of a composer file.

@dannylamb
Copy link
Contributor Author

Looks like this should work with a composer info as @DiegoPino suggested. I'll see what I can do with #671.

Will probably be bugging @jonathangreen about it.

@dannylamb dannylamb self-assigned this Aug 23, 2017
@dannylamb
Copy link
Contributor Author

Going to address the composer install under this issue instead of #671

@dannylamb
Copy link
Contributor Author

Looks like this can be done automagically by the drupal role by defining drupal_composer_dependencies in https://github.com/Islandora-Devops/claw-playbook/blob/master/inventory/vagrant/group_vars/webserver/drupal.yml

I'm testing this out now.

@jonathangreen
Copy link
Contributor

jonathangreen commented Aug 29, 2017

Do we want to jam the variables to up the collection block on the carapace theme in here somewhere? Or maybe we could make another ticket for that.

@dannylamb
Copy link
Contributor Author

@jonathangreen You mean scrape the block's yml out of git and load it into Drupal? Should be straightforward to do that a la https://github.com/Islandora-Devops/claw-playbook/blob/master/roles/internal/webserver-app/tasks/jwt.yml#L25-L40

If you don't run into any other issues bringing up the box, I can try my hand at that.

@jonathangreen
Copy link
Contributor

Theme looks good to me, everything came up clean!

It was really more of a question, we probably want the block to be placed when you spin up the vagrant box, so we need a way to do it. I think what your suggesting makes sense.

@jonathangreen
Copy link
Contributor

Want me to merge PR and we can deal with setting the block in another ticket? Or do you want to give it a go here?

@dannylamb
Copy link
Contributor Author

@jonathangreen Go ahead and merge and I'll set up another issue.

@dannylamb
Copy link
Contributor Author

@jonathangreen #706

@jonathangreen
Copy link
Contributor

Closed with:
#671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants