Skip to content

Commit

Permalink
project skeletons: add ensemble_repository_config var and improve com…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
aszs committed Oct 10, 2024
1 parent 063de78 commit 2ab8049
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 16 deletions.
2 changes: 2 additions & 0 deletions unfurl/skeletons/aws/unfurl.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
apiVersion: unfurl/v1alpha1
kind: Project
[%include | default("") %]
[% ensemble_repository_config | default("") %]

{%- if default_context | default("") %}
default_environment: [%default_context%]
{% endif %}
Expand Down
2 changes: 2 additions & 0 deletions unfurl/skeletons/azure/unfurl.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
apiVersion: unfurl/v1alpha1
kind: Project
[%include | default("") %]
[% ensemble_repository_config | default("") %]

{%- if default_context | default("") %}
default_environment: [%default_context%]
{% endif %}
Expand Down
2 changes: 2 additions & 0 deletions unfurl/skeletons/digitalocean/unfurl.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#jinja2: variable_start_string: '[%', variable_end_string: '%]'
apiVersion: unfurl/v1alpha1
kind: Project
[% ensemble_repository_config | default("") %]

[%include | default("") %]
{%- if default_context | default("") %}
default_environment: [%default_context%]
Expand Down
3 changes: 3 additions & 0 deletions unfurl/skeletons/gcp/unfurl.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#jinja2: variable_start_string: '[%', variable_end_string: '%]'
apiVersion: unfurl/v1alpha1
kind: Project

[% ensemble_repository_config | default("") %]

[%include | default("") %]
{%- if default_context | default("") %}
default_environment: [%default_context%]
Expand Down
25 changes: 9 additions & 16 deletions unfurl/skeletons/home/manifest-template.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ spec:
readyState: ok

service_template:
repositories:
asdf:
url: https://github.com/asdf-vm/asdf.git#v0.8.0

imports:
- repository: unfurl
file: configurators/templates/supervisor.yaml
# - repository: unfurl
# file: configurators/templates/supervisor.yaml
- repository: unfurl
file: tosca_plugins/localhost.yaml
- repository: unfurl
Expand All @@ -35,18 +31,15 @@ spec:
localhost:
type: unfurl.nodes.Localhost

# uncomment if you want to default to using the current context in your kubeconfig
# defaultK8sCluster:
# # set the "default" directive so this template will only be used
# # if no other matching template is defined elsewhere
# directives:
# - default
# type: unfurl.nodes.K8sCluster

# uncomment and deploy if you want to share a local supervisord instance across projects
# (uncomment the above import of configurators/templates/supervisor.yaml too)
# supervisord:
# type: unfurl.nodes.Supervisor
# directives:
# - default
# requirements:
# - host: localhost
#
# once deployed, to use, add this to your project's node_templates:
# supervisord:
# type: unfurl.nodes.Supervisor
# directives:
# - select
3 changes: 3 additions & 0 deletions unfurl/skeletons/k8s/unfurl.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#jinja2: variable_start_string: '[%', variable_end_string: '%]'
apiVersion: unfurl/v1alpha1
kind: Project

[% ensemble_repository_config | default("") %]

[%include | default("") %]
{%- if default_context | default("") %}
default_environment: [%default_context%]
Expand Down
5 changes: 5 additions & 0 deletions unfurl/skeletons/manifest-template.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ spec:
+?include: service_template.py
# It will be merged with the YAML TOSCA definitions defined here.

# uncomment if you want to use the Unfurl Cloud standard library
# repositories:
# std:
# url: https://unfurl.cloud/onecommons/std.git

topology_template:
node_templates: {}
# # this is an example of a minimal node template
Expand Down
3 changes: 3 additions & 0 deletions unfurl/skeletons/service_template.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@

# import tosca

# uncomment if you declared the "std" repository in ensemble-template.yaml
# from tosca_repositories import std

# class MyNodeType(tosca.nodes.Root):
# name: str

0 comments on commit 2ab8049

Please sign in to comment.