Merge branch 'master' of github.com:open-cloud/xos
diff --git a/xos/configurations/common/Makefile.cloudlab b/xos/configurations/common/Makefile.cloudlab
index 929bc14..5712765 100644
--- a/xos/configurations/common/Makefile.cloudlab
+++ b/xos/configurations/common/Makefile.cloudlab
@@ -1,4 +1,4 @@
-all: prereqs admin-openrc flat_name nodes_yaml public_key
+all: prereqs admin-openrc flat_name nodes_yaml public_key private_key
prereqs:
make -f Makefile.prereqs
@@ -7,7 +7,7 @@
sudo cat /root/setup/admin-openrc.sh > admin-openrc.sh
flat_name:
- sudo bash -c "source /root/setup/admin-openrc.sh ; neutron net-list" |grep flat|awk '{print $$4}' > flat_net_name
+ sudo bash -c "source /root/setup/admin-openrc.sh ; neutron net-list" |grep flat|awk '{printf "%s",$$4}' > flat_net_name
nodes_yaml:
bash ./make-cloudlab-nodes-yaml.sh
@@ -15,6 +15,8 @@
public_key: ~/.ssh/id_rsa.pub
cp ~/.ssh/id_rsa.pub .
+private_key: ~/.ssh/id_rsa
+ cp ~/.ssh/id_rsa .
+
~/.ssh/id_rsa.pub:
cat /dev/zero | ssh-keygen -q -N ""
-
diff --git a/xos/configurations/cord/Dockerfile.cord b/xos/configurations/cord/Dockerfile.cord
index e44891a..dad9895 100644
--- a/xos/configurations/cord/Dockerfile.cord
+++ b/xos/configurations/cord/Dockerfile.cord
@@ -3,7 +3,11 @@
ADD xos/configurations/common/flat_net_name /root/setup/
ADD xos/configurations/common/cloudlab-nodes.yaml /opt/xos/configurations/commmon/
ADD xos/configurations/common/id_rsa.pub /root/setup/padmin_public_key
+ADD xos/configurations/common/id_rsa.pub /opt/xos/observers/vcpe/vcpe_public_key
+ADD xos/configurations/common/id_rsa /opt/xos/observers/vcpe/vcpe_private_key
+ADD xos/observers/vcpe/supervisor/vcpe-observer.conf /etc/supervisor/conf.d/
+RUN sed -i 's/proxy_ssh=True/proxy_ssh=False/' /opt/xos/observers/vcpe/vcpe_observer_config
-CMD /usr/bin/make -C /opt/xos/configurations/devel -f Makefile.inside; /bin/bash
+CMD /usr/bin/make -C /opt/xos/configurations/cord -f Makefile.inside; /bin/bash
#CMD ["/bin/bash"]
diff --git a/xos/configurations/kilo-install/Dockerfile.kilo-install b/xos/configurations/kilo-install/Dockerfile.kilo-install
index e4d301b..fabfcd8 100644
--- a/xos/configurations/kilo-install/Dockerfile.kilo-install
+++ b/xos/configurations/kilo-install/Dockerfile.kilo-install
@@ -1,6 +1,5 @@
RUN mkdir -p /root/setup
ADD xos/configurations/common/admin-openrc.sh /root/setup/
-RUN bash -c 'echo "nat-net" > /root/setup/flat_net_name'
ADD xos/configurations/common/cloudlab-nodes.yaml /opt/xos/configurations/commmon/
ADD xos/configurations/common/id_rsa.pub /root/setup/padmin_public_key
diff --git a/xos/configurations/kilo-install/Makefile.inside b/xos/configurations/kilo-install/Makefile.inside
index 40b2672..c49841a 100644
--- a/xos/configurations/kilo-install/Makefile.inside
+++ b/xos/configurations/kilo-install/Makefile.inside
@@ -2,7 +2,7 @@
setup_xos:
bash /opt/xos/scripts/docker_setup_xos
- python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab.yaml
+ python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/kilo-install/cloudlab.yaml
python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab-nodes.yaml
update_certificates:
diff --git a/xos/configurations/kilo-install/cloudlab.yaml b/xos/configurations/kilo-install/cloudlab.yaml
new file mode 100644
index 0000000..f92442c
--- /dev/null
+++ b/xos/configurations/kilo-install/cloudlab.yaml
@@ -0,0 +1,76 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+# Note:
+# assumes the following have been created and filled with appropriate data:
+# /root/setup/admin_openrc
+# /root/setup/flat_net_name
+# /root/setup/padmin_public_key
+
+description: >
+ * Adds OpenCloud Sites, Deployments, and Controllers.
+
+imports:
+ - custom_types/xos.yaml
+
+topology_template:
+ node_templates:
+ trusty-server-multi-nic:
+ type: tosca.nodes.Image
+ properties:
+ disk_format: QCOW2
+ container_format: BARE
+
+ MyDeployment:
+ type: tosca.nodes.Deployment
+ properties:
+ flavors: m1.large, m1.medium, m1.small
+ requirements:
+ - image:
+ node: trusty-server-multi-nic
+ relationship: tosca.relationships.SupportsImage
+
+ CloudLab:
+ type: tosca.nodes.Controller
+ requirements:
+ - deployment:
+ node: MyDeployment
+ relationship: tosca.relationships.ControllerDeployment
+ properties:
+ backend_type: OpenStack
+ version: Juno
+ auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] }
+ admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] }
+ admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] }
+ admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] }
+ domain: Default
+ artifacts:
+ adminrc: /root/setup/admin-openrc.sh
+
+ mysite:
+ type: tosca.nodes.Site
+ properties:
+ display_name: MySite
+ site_url: http://opencloud.us/
+ requirements:
+ - deployment:
+ node: MyDeployment
+ relationship: tosca.relationships.SiteDeployment
+ requirements:
+ - controller:
+ node: CloudLab
+ relationship: tosca.relationships.UsesController
+
+ padmin@vicci.org:
+ type: tosca.nodes.User
+ requirements:
+ - site:
+ node: mysite
+ relationship: tosca.relationships.MemberOfSite
+ properties:
+ public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE ] }
+ is_admin: true
+ is_active: true
+ firstname: XOS
+ lastname: admin
+ artifacts:
+ pubkey: /root/setup/padmin_public_key
diff --git a/xos/core/fixtures/initial_data.json b/xos/core/fixtures/initial_data.json
index 213245c..86658bb 100644
--- a/xos/core/fixtures/initial_data.json
+++ b/xos/core/fixtures/initial_data.json
@@ -334,7 +334,7 @@
"translation": "none",
"backend_status": "0 - Provisioning in progress",
"shared_network_name": null,
- "controller_kind": "none",
+ "controller_kind": null,
"enacted": null
},
"model": "core.networktemplate",
@@ -356,7 +356,7 @@
"translation": "NAT",
"backend_status": "0 - Provisioning in progress",
"shared_network_name": "nat-net",
- "controller_kind": "none",
+ "controller_kind": null,
"enacted": null
},
"model": "core.networktemplate",
@@ -378,7 +378,7 @@
"translation": "none",
"backend_status": "0 - Provisioning in progress",
"shared_network_name": "ext-net",
- "controller_kind": "none",
+ "controller_kind": null,
"enacted": null
},
"model": "core.networktemplate",
diff --git a/xos/core/models/flavor.py b/xos/core/models/flavor.py
index 3d6b9bb..8251eb1 100644
--- a/xos/core/models/flavor.py
+++ b/xos/core/models/flavor.py
@@ -18,6 +18,10 @@
app_label = "core"
ordering = ('order', 'name')
+ def __init__(self, *args, **kwargs):
+ super(Flavor, self).__init__(*args, **kwargs)
+ self.no_sync=True
+
def __unicode__(self): return u'%s' % (self.name)
""" FlavorParameterType and FlavorParameter are below for completeness sake,
diff --git a/xos/core/models/site.py b/xos/core/models/site.py
index 42855a9..26ff191 100644
--- a/xos/core/models/site.py
+++ b/xos/core/models/site.py
@@ -168,6 +168,9 @@
# given a default of 'allow site <site_of_creator>'
accessControl = models.TextField(max_length=200, blank=False, null=False, default="allow all",
help_text="Access control list that specifies which sites/users may use nodes in this deployment")
+ def __init__(self, *args, **kwargs):
+ super(Deployment, self).__init__(*args, **kwargs)
+ self.no_sync=True
def get_acl(self):
return AccessControlList(self.accessControl)
@@ -261,7 +264,10 @@
admin_tenant = StrippedCharField(max_length=200, null=True, blank=True, help_text="Name of the tenant the admin user belongs to")
domain = StrippedCharField(max_length=200, null=True, blank=True, help_text="Name of the domain this controller belongs to")
deployment = models.ForeignKey(Deployment,related_name='controllerdeployments')
-
+
+ def __init__(self, *args, **kwargs):
+ super(Controller, self).__init__(*args, **kwargs)
+ self.no_sync=True
def __unicode__(self): return u'%s %s %s' % (self.name, self.backend_type, self.version)