Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Added easyappointments catalog item to cattle #804

Closed

Conversation

clayrisser
Copy link

Fixes issue #803

label: 'Mysql Host'
description: 'Leave empty to spin up a mysql docker container'
type: string
required: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think to replace mysql_host type string to type service??

    - variable: mysql_host
      label: 'Mysql Host'
      description: 'Leave empty to spin up a mysql docker container'
-      type: string
+      type: service
      required: false

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with type service

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type service shows combo box wit a list of stack/services running at rancher.. could be exposed at service as link or external_link... Useful when you have more than one ip to expose and it's resilient to service update/upgrade...

Copy link
Author

@clayrisser clayrisser Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, yeah that's not what MySQL host is for. You only fill it out if you're doing an external connection

- 1
- 1.2.0
- 1.2
- latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use generic docker image tags, implicit or explicit, is a bad practice due to is not reproducible. Otherwise, catalog packages manage versions, update,...

Could you please add one catalog package version for each docker image tag, one for 1.2.0 other for 1.3.0 and remove latest??

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sure


catalog:
name: 'Easy!Appointments'
version: 0.1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think if you match this version with service version??

-  version: 0.1.0
+  version: 1.3.0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that standard practice?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to make it standard due to it's more clear.. Package version 1.3.0 install service version 1.3.0

name: 'Easy!Appointments'
description: |
Open source appointment scheduler
version: 0.1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think if you match this version with service version??

-version: 0.1.0
+version: 1.3.0

- {{.Stack.Name}}--mysql-data:/var/lib/mysql
labels:
io.rancher.container.hostname_override: container_name
{{- end}}
Copy link
Contributor

@rawmind0 rawmind0 Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To use golang templating, you need to rename templates/easyappointments/0/docker-compose.yml to templates/easyappointments/0/docker-compose.yml.tpl. Build is failing due to that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will do

DB_USERNAME: ${mysql_user}
{{- if (.Values.mysql_host)}}
DB_HOST: ${mysql_host}
{{- end}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the default value of env var DB_HOST?? What do you think to define like that??

{{- if not (.Values.mysql_host)}}
    links:
      - mysql:db
+{{- else }}
+    external_links:
+      - ${mysql_host}:db
{{- end }}
    environment:
      BASE_URL: ${base_url}
      DB_NAME: ${mysql_database}
      DB_PASSWORD: ${mysql_password}
      DB_USERNAME: ${mysql_user}
+      DB_HOST: db
-{{- if (.Values.mysql_host)}}
-      DB_HOST: ${mysql_host}
-{{- end}}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is so they can connect with a remote database if they so choose to. Read the description of the msyql_host question in the rancher config. Also, the default value of DB_HOST is db, hence the reason I link to db when mysql_host is not set.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i know what you are doing here and it works. Just a proposal that may be more clear.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, very nice

@rawmind0
Copy link
Contributor

Hi @codejamninja . Thanks for the PR and contribute.

Could you please take a look to changes requested??

@cjellick
Copy link
Contributor

cjellick commented Aug 1, 2020

Closing this due to staleness. Feel free to reopen or open a new PR if there's still a relevant change to be made. Thanks!

@cjellick cjellick closed this Aug 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants