Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Our app is hosted on a private repo that requires an SSH key to access, and the node-app charm assumes that the repo is available publicly.

Is there a way to install the key automatically and securely?

share|improve this question
    
Could this be defined in SSH config (~/.ssh/config)? –  James Fu Oct 24 '13 at 2:27
add comment

1 Answer 1

The short answer is no, but the long answer is a little more complicated.

According to the node-app charm's documentation there does not seem to be a way to configure it to take credentials. There's two ways you could work around this:

  1. Download the code for the charm and modify it to accept credentials. You can then either deploy your modified charm or (preferably) submit the modification to the charm store so others can use that feature.

  2. (less desireable and not scalable) You could manually add the ssh key to the deployed machine:

    juju deploy node-app
    

    ssh to the machine that was created:

    juju ssh node-app/0
    

    and manually add the ssh key to that machine in whatever way your repo supports.

Number 2 is the least work, but it's also the most manual and least repeatable. If you ever have to add units to node-app, you'd need to repeat that process for each of them.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.