Hi,

I would like to follow up on this in order to let the list know how I
solved this, in case anyone else wants to run EMANE on AWS.

The reason we could not ssh into the containers, is by default the lxc
containers emane starts up on aws in the tutorials only accepts ssh
connections using the same key pair that was used when vm was created. AWS
utilizes .pem keys as the default way to ssh into the vm, and the AWS
system maintains the public key part of that key only (although you can NOT
access that). As mentioned the lxc containers that emane tutorial boots up,
ONLY accepts ssh connections which have access to that initial .pem key. I
assume this is somehow part of the default ssh config in these linux vms,
although I didn't find any explicit reference to it.
So the process to get access to the lxc EMANE containers from the tutorial
is the following:
1. Upload the .pem key you used to create the vm to where emane is running.
2. Generate a private and public key from the .pem key.
3. Rename the private and public key id_rsa and id_rsa.pub (it didn't work
if I didnt do this), and put them in ~/.ssh/.

There is also a difference between using Ubuntu 16.04 vs Ubuntu 14.04 on
aws. Using 16.04 the lxc commands can not see any of the containers the
emane tutorial creates, while with 14.04 we can. It is still hard to
interact with them, and you can not start them using the regular lxc
commands. That said, the above should work with both 16.04 and 14.04,
although 16.04 as provided by amazon is unstable, so I would not recommend
it. We had to reboot clean installations of 16.04 at least once a day for
no apparent reason.

So with the above you can run EMANE and the tutorials on AWS, which is
really great! There is a number of dependency issues when trying to compile
emane from source that is not part of the wiki. The most important of those
is the dependence on python3-protobuf which is not available for Ubuntu
14.04 nor 16.04 (but is for 17.10, recent added dependence?). I used the
PPA available from https://launchpad.net/%7Emaarten-fonville/+archive/
ubuntu/protobuf
<https://www.google.com/url?q=https://launchpad.net/%257Emaarten-fonville/%2Barchive/ubuntu/protobuf&sa=D&source=hangouts&ust=1520973274219000&usg=AFQjCNGnTSuM7p7DMkVstnJm1jbfdxj3CQ>
to solve this, but would be eager to have a comment on this as I will
install EMANE on more instances.
Installing opentestpoint  was also a bit problematic. Apparently it wanted
to use the libzmq3-dev package and nothing else (I tried libzmq3 and
libzmq-dev without success). Some dependency info on the github page and
README for this would be great.

As for Stevens earlier comments, this is only for running the
emane-tutorials. Another custom setup is to install your own lxc containers
that you setup yourself and then use the OTA workflow, and this ssh problem
would not be a thing.

I am still a bit curios about what the difference is between booting up
your own lxc containers, and using the tutorial scripts . The lxc
containers the tutorial boots up is much more lightweight and share the
same filesystem (which is truly awesome!),  while the other lxc containers
I boot up myself seems to be more self contained like mini vms. This may be
my lacking knowledge about lxc containers, but if EMANE or the
emane-tutorials is doing something special with lxc, I would like to know
about it, because it is really great.

Best
Anders




On Thu, Mar 15, 2018 at 6:42 PM, Anders Nilsson Plymoth <and...@telhoc.se>
wrote:

> Hi Steven,
>
> Thank you for your reply.
>
> I know that EMANE does not require lxc containers, and that it can be
> configured to run on physical machines and vm's. In our case we really want
> to use lxc containers.
>
> "The tutorial provides a simple test flow using LXC Containers
> <https://linuxcontainers.org> to create a set of *test nodes* that run
> emulator instances along with other applications and services typically
> used in the MANET world"
>
> "The *democtl-host* script will launch a number of LXC containers using
> *lxc-execute* to invoke the *scripts/demo-init* script for each
> container."
>
> This clearly indicates that the tutorial will start up lxc containers,
> just like we want it to.
>
> "From your host machine you can ssh into a container using the *10.99.0.0/24
> <http://10.99.0.0/24>* network (*node-<NODEID>* host names)."
>
> This is what we can NOT do, and what we are asking about. Can you provide
> some more details that might help us with this?
>
> Do you have some details as to how the lxc containers are configured in
> EMANE, where their config files and file systems are
> located so we configure them to allow us SSH access. Normal lxc containers
> have most of their details in the /var/lib/ subfolders, but EMANE seems to
> use something else. Any detail you can provide would be helpful.
>
>
>
> On Thu, Mar 15, 2018 at 4:58 PM, Steven Galgano <sgalg...@adjacentlink.com
> > wrote:
>
>>
>>
>> Note: Later versions of lxc require you to sudo the lxc-* commands to
>> access privileged container information.
>>
>>
> Yes, we always use sudo for the lxc commands, but the emane containers
> seems to be hidden by the regular lxc commands for some reason.
>
> Best
> Anders
>
>
>
>
>
>> --
>> Steven Galgano
>> Adjacent Link LLC
>> www.adjacentlink.com
>>
>>
>> On 03/15/2018 10:27 AM, Anders Nilsson Plymoth wrote:
>> > Hi,
>> >
>> > Just like the other post, I would like to be able to run EMANE on cloud
>> > VMs, and while installing and running EMANE on Ubuntu 16.04 instances
>> > work fine, we can not ssh into the containers.
>> >
>> > For other lxc regular containers, we can setup ssh keys and ssh access
>> > policies, but here we seem to be locked out, and can use the regular lxc
>> > commands.
>> > Using the regular lxc commands, we can not see the lxc containers
>> > created by EMANE, nor can we connect to them.
>> > We can infer that they are indeed started, and we can ping them on
>> > 10.99.0.x (via the EMANE tutorials).
>> >
>> > Can you please provide some details as to how the lxc containers are
>> > configured in EMANE, where their config files and file systems are
>> > located so we configure them to allow us SSH access. Normal lxc
>> > containers have most of their details in the /var/lib/ subfolders, but
>> > EMANE seems to use something else.
>> > Any detail you can provide would be helpful.
>> >
>> > Thanks!
>> > Anders
>> >
>> >
>> > _______________________________________________
>> > emane-users mailing list
>> > emane-users@nrl.navy.mil
>> > https://publists.nrl.navy.mil/mailman/listinfo/emane-users
>> >
>>
>
>
_______________________________________________
emane-users mailing list
emane-users@nrl.navy.mil
https://publists.nrl.navy.mil/mailman/listinfo/emane-users

Reply via email to