3

Deploying a charm to your MAAS Now you're ready for the most exciting part: deploying a charm to your MAAS!

juju deploy mysql MAAS will now allocate a node to Juju and Juju will deploy the MySQL charm to that node. Again, it'll take a few minutes to complete while Ubuntu installed and then the charm deploys.

Let's have a quick status-check:

juju status Once the charm is deployed, you'll see it reflected in the environment's status.

If you have another node free you can deploy WordPress and hook it up to the MySQL service we just deployed:

juju deploy wordpress juju add-relation wordpress mysql juju expose wordpress juju status

From: https://wiki.ubuntu.com/ServerTeam/MAAS/Juju

And I get this:

hsf@ubuntuserwer:~$ juju status
2012-10-03 12:47:16,340 INFO Connecting to environment...
Enter passphrase for key '/home/hsf/.ssh/id_rsa':
2012-10-03 12:47:19,446 INFO Connected to environment.
machines:
  0:
    agent-state: running
    dns-name: ubuntuone
    instance-id: /MAAS/api/1.0/nodes/node-5ac593cc-0c76-11e2-a143-001185e67955/
    instance-state: unknown
  1:
    agent-state: not-started
    dns-name: node-001185e677fe.local
    instance-id: /MAAS/api/1.0/nodes/node-f108eb80-0d3a-11e2-ad9f-001185e67955/
    instance-state: unknown
  2:
    agent-state: not-started
    dns-name: node-001185e6772b.local
    instance-id: /MAAS/api/1.0/nodes/node-cc14c3c8-0d42-11e2-864b-001185e67955/
    instance-state: unknown
services:
  mysql:
    charm: cs:precise/mysql-8
    relations:
      db:
      - wordpress
    units:
      mysql/1:
        agent-state: pending
        machine: 1
        public-address: null
  wordpress:
    charm: cs:precise/wordpress-9
    exposed: true
    relations:
      db:
      - mysql
      loadbalancer:
      - wordpress
    units:
      wordpress/1:
        agent-state: pending
        machine: 2
        open-ports: []
        public-address: null
2012-10-03 12:47:20,404 INFO 'status' command finished successfully

I tried several times and still is the same problem. Aget-state is saying that machines aren't started but they are.

What I am doing wrong?

Also when i run juju debug-log I get:

hsf@ubuntuserwer:~$ juju debug-log
2012-10-03 14:04:16,661 INFO Connecting to environment...
Enter passphrase for key '/home/hsf/.ssh/id_rsa':
2012-10-03 14:04:19,264 INFO Connected to environment.
2012-10-03 14:04:19,265 INFO Enabling distributed debug log.
2012-10-03 14:04:19,269 INFO Tailing logs - Ctrl-C to stop.
2012-10-03 13:56:03,513 Machine:0: juju.agents.machine INFO: Machine agent start                                                                                        ed id:0
2012-10-03 14:03:21,113 Machine:0: twisted ERROR: Unhandled error in Deferred:
2012-10-03 14:03:21,145 Machine:0: twisted ERROR: Unhandled Error
Traceback (most recent call last):
Failure: zookeeper.NodeExistsException: node exists

1 Answer 1

3

Tha it's work! I again install ubuntu server and this time everything goes well but one thing. Now when I juju status I see this:

2012-10-04 13:32:21,110 INFO Connected to environment.
machines:
  0:
    agent-state: running
    dns-name: node-00127968a7be.local
    instance-id: /MAAS/api/1.0/nodes/node-ab7c5eb6-0e08-11e2-bb37-001185e67955/
    instance-state: unknown
  1:
    agent-state: running
    dns-name: node-001185e677fe
    instance-id: /MAAS/api/1.0/nodes/node-82beae92-0e09-11e2-a134-001185e67955/
    instance-state: unknown
  2:
    agent-state: running
    dns-name: node-001185e6772b.local
    instance-id: /MAAS/api/1.0/nodes/node-5c21dc18-0e0a-11e2-a134-001185e67955/
    instance-state: unknown
services:
  mysql:
    charm: cs:precise/mysql-8
    relations:
      db:
      - wordpress
    units:
      mysql/0:
        agent-state: started
        machine: 1
        public-address: node-001185e677fe.localdomain
  wordpress:
    charm: cs:precise/wordpress-9
    exposed: true
    relations:
      db:
      - mysql
      loadbalancer:
      - wordpress
    units:
      wordpress/0:
        agent-state: started
        machine: 2
        open-ports:
        - 80/tcp
        public-address: node-001185e6772b.local

public adress seems be strange because it's name of my nodes. I check on my router adress of node where is wordpress and type on webbrowser but I get

502 Bad Gateway nginx/1.1.19

I don't know what to do. Please help me.

1
  • Are you sure you have your gateway set up correctly? 1.1.19 isn't a valid IP address.
    – rmustakos
    May 31, 2016 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .