Setting up local development system for VM-based ceph cluster

26 views
Skip to first unread message

Lin LIU

unread,
Nov 8, 2018, 9:43:27 AM11/8/18
to openATTIC Users
Hi all,

I want to set up a development environment in my laptop (computer 1, C1), but got some problems.

For now, I have a Ceph cluster of 4 VMs in another remote server  (computer 2, C2) and these nodes are behind a NAT network. C1 and C2 are in the same network, and they can talk with each other freely.

I have cloned the source code and also builded openATTIC with successfully viewing its web interface in the local web browser of C1, but I don't know how to 'connect' it with the cluster.

Initially, I have installed the openATTIC service in the admin node of cluster, and 'redirect' to the host of VM (C2) via a port xxxx, that means I can see the web interface in the web browser of C2 on http://ip_of_admin_node/openattic
Then I followed with the step ''How to run the frontend in a local server'' in the official documentation, updated the hostname of backend with the ip_of_C2:port_xxxx, so that I can access the web interface in my laptop on ip_of_C2:port_xxxx, and authenticate with default  user 'openattic' and pwd 'openattic'.

But I don't think this is the correct way, right? It's just a 'redirection' operation, and I am in fact still using the service of openATTIC in the admin node (openATTIC role in the policy file is set to the admin node).

Now I deleted the openATTIC service in the admin node, so how should I do for connecting the openATTIC in my laptop to the ceph cluster of 4 VMs in a remote server? Should I add my laptop as a node of cluster and also assign it with and only with the role of openATTIC?

Any help/advice is welcomed. And actually this is my first time to open a topic,sorry for any possible mistakes caused.

Thank you!

Lin

Patrick Nawracay

unread,
Nov 9, 2018, 1:45:09 AM11/9/18
to Lin LIU, openATTIC Users
Hi Lin,

welcome to this list!

openATTIC is using librados to connect to the Ceph cluster. The keys
have to be in `/etc/ceph/`. If openATTIC is unable to detect or access
any keys, it will write that incident to the log file in
`/var/log/openattic.log`. It is possible, that openATTIC runs on another
server than the Ceph cluster using this technique, but it has to have
the appropriate keys and packages installed (librados for instance).
There is no need to run openATTIC on a cluster node, although that can
potentially speed up some operations.

You can take a look at the `ClusterConfiguration` class in our
`librados.py` [1] to see how keys are used and how oA reacts if it can't
find or access any keys. The log file is also a very valuable source of
information for all kinds of dependency issues and missing libraries. We
usually just install openATTIC ordinarily using the package manager of
our distribution and then convert that system to become a development
environment, as described in the documentation. This way we can avoid
any problems with packages and/or libraries.

Good luck with your setup!

Patrick

[1]
https://bitbucket.org/openattic/openattic/src/6689577a1f06eec7bcd3d069d23b70502b0ad16f/backend/ceph/librados.py?at=master&fileviewer=file-view-default

On 08.11.18 15:43, Lin LIU wrote:
> Hi all,
>
> I want to set up a development environment in my laptop (computer 1,
> C1), but got some problems.
>
> For now, I have a Ceph cluster of 4 VMs in another remote server 
> (computer 2, C2) and these nodes are behind a NAT network. C1 and C2
> are in the same network, and they can talk with each other freely.
>
> I have cloned the source code and also builded openATTIC with
> successfully viewing its web interface in the local web browser of C1,
> but I don't know how to 'connect' it with the cluster.
>
> Initially, I have installed the openATTIC service in the admin node of
> cluster, and 'redirect' to the host of VM (C2) via a port /xxxx/, that
> means I can see the web interface in the web browser of C2 on
> /http://ip_of_admin_node/openattic/
> Then I followed with the step /''How to run the frontend in a local
> server''/ in the official documentation
> <https://openattic.readthedocs.io/en/latest/developer_docs/setup_howto.html>,
> updated the hostname of backend with the /ip_of_C2:port_xxxx/, so that
> I can access the web interface in my laptop on /ip_of_C2:port_xxxx/,
> and authenticate with default  user 'openattic' and pwd 'openattic'.
>
> But I don't think this is the correct way, right? It's just a
> 'redirection' operation, and I am in fact still using the service of
> openATTIC in the admin node (openATTIC role in the policy file is set
> to the admin node).
>
> Now I deleted the openATTIC service in the admin node, so how should I
> do for connecting the openATTIC in my laptop to the ceph cluster of 4
> VMs in a remote server? Should I add my laptop as a node of cluster
> and also assign it with and only with the role of openATTIC?
>
> Any help/advice is welcomed. And actually this is my first time to
> open a topic,sorry for any possible mistakes caused.
>
> Thank you!
>
> Lin
> --
> You received this message because you are subscribed to the Google
> Groups "openATTIC Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openattic-use...@googlegroups.com
> <mailto:openattic-use...@googlegroups.com>.
> To post to this group, send email to openatt...@googlegroups.com
> <mailto:openatt...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openattic-users/f3feb5a6-81ee-41f2-a2de-e6dca16a2444%40googlegroups.com
> <https://groups.google.com/d/msgid/openattic-users/f3feb5a6-81ee-41f2-a2de-e6dca16a2444%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)


signature.asc

Lin LIU

unread,
Nov 10, 2018, 7:36:13 AM11/10/18
to openATTIC Users

Hi Patrick,

 

Thank you for your reply.

 

I noticed the problem of keys, and also putted the keys under the directory, which is indicated in the step of post-installation configuration of the documentation.

 

I think the major problem is that my cluster of 4 virtual machines is behind a NAT network, my laptop can’t access to these VMs directly, and thus can’t connect to the cluster even with the keys. I may need to add a bridge network to the cluster, or deploy the environment in the server, since the server is the host, it can access to them.

 

In the end, out of some reasons (security, etc.), I chose to install a new VM in the NAT network, and decided to deploy the development system in that new VM. I will then try your method of installing openATTIC using package manager of the distribution and converting it to a development system.

 

Anyway, thank you very much Patrick. I will try next Monday to see if I could be able to connect to the cluster with the new VM.

 

Have a nice weekend!

 

Lin

Lin LIU

unread,
Nov 12, 2018, 2:26:02 AM11/12/18
to openATTIC Users
Hi Patrick,

I managed to connect to the cluster using a VM under the same NAT network, and finally access to the oA web interface.

The method of converting original installed oA to a development environment works for me, thanks a lot!

Have a nice day ~

Sincerely,

Lin

On Friday, November 9, 2018 at 2:45:09 PM UTC+8, Patrick Nawracay wrote:
Reply all
Reply to author
Forward
0 new messages