cloud66-oss / starter Goto Github PK
View Code? Open in Web Editor NEWHelping you get started with containerized apps.
Home Page: https://www.cloud66.com/opensource-software/
License: Apache License 2.0
Helping you get started with containerized apps.
Home Page: https://www.cloud66.com/opensource-software/
License: Apache License 2.0
I tried installing Starter using the latest EXE from the release: windows_amd64_1.4.3.exe
Double-clicking on it didn't help, so I opened a Terminal with Admin right and executed that file. This is what I got:
Now, even if I try starter help
in the Terminal, it says 'starter' is not recognized. Please help.
The service command/port for Padrino and Sinatra apps is either empty (see #5) or incorrect:
---
services:
web:
git: [email protected]:cloud66-samples/padrino-mysql-active_record.git
git_branch: master
command: bundle exec rack s _env:$RACK_ENV
ports:
- 3000:80:443
env_vars:
RAILS_ENV: production
RACK_ENV: production
databases:
- mysql
This app runs on 9292 and uses rackup
command to start.
when you use for instance mysql image you need to set the database name for example as a environment variable.
add a -v flag or show the version if you run starter
Repository contains tire
gem, and uses Elasticsearch. This isn't added to databases in service config:
---
services:
web:
git: [email protected]:cloud66-samples/rails-psql-elasticsearch.git
git_branch: master
command:
ports:
- 9292:80:443
env_vars:
RAILS_ENV: production
RACK_ENV: production
databases:
- postgresql
Perhaps we need to implement similar detection from main app for various gems.
In Windows (10 Home) terminal coloring not working.
It output weird text at the start
?[92m Starter (c) 2019 Cloud66 Inc.
?[0m?[35m Checking templates in C:\Users\<user-name>\.starter
On running any commands
There's no check for database credentials - either to tell user how to update them (with env vars) or just updating them automatically. So application deploys but then can't connect to db. Example repo: https://github.com/cloud66-samples/rails-psql-hooks
Hi Team,
I have downloaded the file and ran the install script but the starter command isn't being recognized, can you please help.
Installing Starter V1.4.1
Downloading Starter for Linux x64...
##################################################################################################################### 100.0%
Copying Starter to /home/ec2-user/.starter/starter ...
Making starter command executable ...
Creating Starter symlink in /usr/local/bin/starter ...
The 'starter' command should now be available
Successfully installed Starter! Go build some images!
[ec2-user@ip-172-31-XX-XX starter-1.4.2]$ starter
-bash: starter: command not found
starter 1.1 is not available in brew. add to brew tap.
Hi,
could you please add these frameworks too for java and .net?
Regards,
Yogesh
Would be great to be able to install it and update it with the gofish go package installer.
Starter should support consuming Docker Compose file and generating Cloud 66 Service yaml file.
This will be done by scanning the source code fot docker-compose.yml
or the following command line syntax:
$ starter --in my-compose-file.yml --in-format compose ...
I have a SpringBoot project and, tried
root@875dcba9e6af:/home/springboot-jsp-demo# starter -g dockerfile,service,docker-compose
Starter (c) 2019 Cloud66 Inc.
Checking templates in /root/.starter
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
Local templates are up to date
Detecting framework for the project at /home/springboot-jsp-demo
Failed to detect supported framework
If detect Rails app, set RAILS_ENV on stack based on it
With c66starter-1.0.2
starter -overwrite dockerfile,service,docker-compose
raises
Failed to write service.yml due to: template: service.yml.template:29:6: executing
"service.yml.template" at <.Name>: can't evaluate field Name in type string
and docker-compose does not get created.
The service.yml currently generated sets branch to master by default, even though I may be on another branch. It should use the current branch I'm on.
$ starter
Cloud 66 Starter - (c) 2015 Cloud 66
Detecting framework for the project at /usr/local/bin/starter
Found ruby application
----> Found Mysql
----> Found PostgreSQL
Failed to write Dockerfile due to open templates/ruby.dockerfile.template: no such file or directory
Parsing Procfile
Failed to parse Procfile due to open /usr/local/bin/starter/Procfile: not a directory
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x31eb]
goroutine 16 [running]:
runtime.panic(0x16d260, 0x2774c4)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
main.main()
/home/shab/Projects/go/src/github.com/cloud66/starter/main.go:84 +0x10db
goroutine 19 [finalizer wait]:
runtime.park(0x17690, 0x27a1d0, 0x279589)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x27a1d0, 0x279589)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
It's looking for Procfile in directory of executable rather than current path. Looks like it's happening here: https://github.com/cloud66/starter/blob/dev/main.go#L79
$ ~/Downloads/starter_linux_amd64 -g dockerfile,service,docker-compose
Starter (c) 2017 Cloud66 Inc.
Checking templates in /home/sysdef/.starter
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
Local templates are up to date
Detecting framework for the project at /home/sysdef/projects/mia/control/docker/frontend
Failed to detect supported framework
We use custom_web
instead of the web
directive - this should populate the service command field if available. If not there should be a standard command for Rails apps.
Example (with our Discourse app):
---
services:
web:
git: [email protected]:cloud66-samples/discourse.git
git_branch: master
command: bundle exec rails server -p _env:PORT
ports:
- 9292:80:443
env_vars:
RAILS_ENV: production
RACK_ENV: production
worker:
git: [email protected]:cloud66-samples/discourse.git
git_branch: master
command: bundle exec sidekiq -e _env:RAILS_ENV
env_vars:
RAILS_ENV: production
RACK_ENV: production
databases:
- postgresql
- redis
Also note that the port attribution is incorrect (should be port 3000).
tarter (c) 2019 Cloud66 Inc.
Checking templates in /home/backoffice/.starter
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
No local templates found. Downloading now.
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/node.dockerfile.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/python.dockerfile.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/ruby.dockerfile.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/php.dockerfile.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/service.yml.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/docker-compose.yml.template
Local templates are up to date
Detecting framework for the project at /srv/http/wildcard.example.org/public_html/crm
Found node application
Found php application
More than one framework detected. Please choose which of the following should be used:
NODE
PHP
PHP
Enter php version: [latest] 7.4
Found mysql, confirm? [Y/n] y
Add any other databases? [y/N] y
See http://help.cloud66.com/building-your-stack/docker-service-configuration#database-configs for complete list of possible values
Example: 'mysql elasticsearch'
mysql crm_dev
----> Writing Dockerfile...
----> Writing service.yml...
Failed to write service.yml due to: template: service.yml.template:21:9: executing "service.yml.template" at <.Tags>: can't evaluate field Tags in type *common.Service%
Command for various services isn't being populated, for example for these two apps:
https://github.com/cloud66-samples/rails-psql-elasticsearch
https://github.com/cloud66-samples/sinatra-postgres-mongo-redis
It adds an empty field:
web:
git: [email protected]:cloud66-samples/rails-psql-elasticsearch.git
git_branch: master
command:
ports:
- 9292:80:443
env_vars:
RAILS_ENV: production
RACK_ENV: production
I have tried to use starter
on windows. I always have the error Failed to detect supported framework
What could be the cause, I installed bu downloading from the link provided. Same error when executing starter on Ubuntu 14:
root@test-virtual-machine:/home# ./starter_linux_amd64 -p -g dockerfile /codegen/python_client Starter (c) 2017 Cloud66 Inc. Checking templates in /home/test/.starter ----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json No local templates found. Downloading now. ----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json ----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/node.dockerfile.template ----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/python.dockerfile.template ----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/ruby.dockerfile.template ----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/php.dockerfile.template ----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/service.yml.template ----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/docker-compose.yml.template Local templates are up to date Detecting framework for the project at -g Failed to detect supported framework
I'm not sure if this is the best place for this, so apologies if not, but I can't make the tool work correctly.
In the first instance, I run the starter -g dockerfile,service,docker-compose
command, but this just tells me:
flag provided but not defined: -g
Usage of starter:
-branch string
template branch in github (default "master")
-e string
set project environment (default "production")
-overwrite
overwrite existing files
-p string
project path
-templates string
location of the templates directory
-y do not prompt user
So I try again using starter dockerfile,service,docker-compose
, which seems to have some more joy, allowing me to answer questions about my project, but then fails on:
Failed to write service.yml due to: template: service.yml.template:29:6: executing "service.yml.template" at <.Name>: can't evaluate field Name in type string
Which generates the following files:
Dockerfile
# Generated by Cloud66 Starter
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential nodejs imagemagick libmagickwand-dev
ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
ADD Gemfile* $APP_HOME/
RUN bundle install
ADD . $APP_HOME
service.yml
---
services:
##NEWLINE##
web:
git_url: [email protected]
git_branch: master
command: bundle exec puma -p _env:PORT -C ./config/puma.rb
build_command: /bin/sh -c "RAILS_ENV=_env:RAILS_ENV bundle exec rake db:schema:load"
deploy_command: /bin/sh -c "RAILS_ENV=_env:RAILS_ENV bundle exec rake db:migrate"
build_root: .
ports:
- container: 3000
http: 80
https: 443
env_vars:
RAILS_ENV: production
RACK_ENV: production
##NEWLINE##
worker:
git_url: [email protected]
git_branch: master
command: bundle exec rake jobs:work
build_root: .
env_vars:
RAILS_ENV: production
RACK_ENV: production
##NEWLINE##
databases:
-
The app in question is a Rails app based off suspenders.
I am running starter
for rails 5.0.0.rc1
and Dockerfile
seems to generate without error, but I get error when writing service.yml
.
Failed to write service.yml due to: template: service.yml.template:29:6: executing "service.yml.template" at <.Name>: can't evaluate field Name in type string
service.yml.template:29:6
has this code:
- {{.Name}}
Am I missing anything in config/database.yml
file? Please suggest
Probably due to incompatible golang versions
Step 7/11 : RUN go get github.com/onsi/gomega
---> Running in 3c2a9a295f27
#github.com/onsi/gomega
src/github.com/onsi/gomega/gomega_dsl.go:312: syntax error: unexpected = in type declaration
src/github.com/onsi/gomega/gomega_dsl.go:338: syntax error: unexpected = in type declaration
src/github.com/onsi/gomega/gomega_dsl.go:352: syntax error: unexpected = in type declaration
ERROR: Service 'starter' failed to build: The command '/bin/sh -c go get github.com/onsi/gomega' returned a non-zero code: 2
I'm running starter
in the root folder of my Django project and get the error message "Failed to detect supported framework". The root folder has a requirements.txt
as well as a manage.py
file.
Can use one of these gems to detect Mongo:
mongo
mongo_mapper
dm-mongo-adapter
mongoid
$ starter -p /Users/pkallberg/code/samples/rails-mysql
Cloud 66 Starter - (c) 2015 Cloud 66
Detecting framework for the project at /Users/pkallberg/code/samples/rails-mysql
Found ruby application
----> Found Mysql
----> Found PostgreSQL
Failed to write Dockerfile due to open templates/ruby.dockerfile.template: no such file or directory
Parsing Procfile
----> Found Procfile item worker
----> Found Procfile item scheduler
Failed to write services.yml due to open templates/service.yml.template: no such file or directory
Done
Got around it by specifying the templates directory:
$ starter -p /Users/pkallberg/code/samples/rails-mysql -templates /Users/pkallberg/code/cloud66/starter/templates/
Cloud 66 Starter - (c) 2015 Cloud 66
Detecting framework for the project at /Users/pkallberg/code/samples/rails-mysql
Found ruby application
----> Found Mysql
----> Found PostgreSQL
Writing Dockerfile...
Parsing Procfile
----> Found Procfile item worker
----> Found Procfile item scheduler
Writing service.yml...
Done
Hello. I would like to request a feature that starter:
even when using Docker binaries, would be able to working outside of it's folder structure
would have build-in list of framework types, from with user could select thru the CLI (this would solve the issues, like #117 )
Above proposal would increase the development speed, since it would remove the need of putting the files inside of the Docker related folders and would resolve some problems that would prevent it from working correctly
Is this expected?
sviridkin@mbp:~/git/github.com/lexfrei/docker$ starter
Cloud 66 Starter ~ (c) 2016 Cloud 66
Checking templates in /Users/sviridkin/.starter
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
Failed to download latest templates due to Get https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json: dial tcp 151.101.0.133:443: i/o timeout
✗: 1 @ Mon Jun 11 05:23:28 MSK 2018
sviridkin@mbp:~/git/github.com/lexfrei/docker$ curl https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
{
"version" : "1.0.2",
"dockerfiles" : [
{ "name": "node.dockerfile.template", "url" : "https://raw.githubusercontent.com/cloud66/starter/{{.branch}}/templates/node.dockerfile.template"},
{ "name": "python.dockerfile.template", "url" : "https://raw.githubusercontent.com/cloud66/starter/{{.branch}}/templates/python.dockerfile.template"},
{ "name": "ruby.dockerfile.template", "url" : "https://raw.githubusercontent.com/cloud66/starter/{{.branch}}/templates/ruby.dockerfile.template"},
{ "name": "php.dockerfile.template", "url" : "https://raw.githubusercontent.com/cloud66/starter/{{.branch}}/templates/php.dockerfile.template"}
],
"service-ymls" : [
{ "name": "service.yml.template", "url" : "https://raw.githubusercontent.com/cloud66/starter/{{.branch}}/templates/service.yml.template"}
],
"docker-compose-ymls" : [
{ "name": "docker-compose.yml.template", "url" : "https://raw.githubusercontent.com/cloud66/starter/{{.branch}}/templates/docker-compose.yml.template"}
]
}
✓ @ Mon Jun 11 05:24:21 MSK 2018
sviridkin@mbp:~/git/github.com/lexfrei/docker$ ping 151.101.0.133 -c1
PING 151.101.0.133 (151.101.0.133): 56 data bytes
64 bytes from 151.101.0.133: icmp_seq=0 ttl=57 time=40.036 ms
--- 151.101.0.133 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 40.036/40.036/40.036/0.000 ms
✓ @ Mon Jun 11 05:24:31 MSK 2018
There are multiple, total failures with this program:
installed start via the bash script as recommended in another issue. The homebrew way still installs a very outdated version.
running starter -g dockerfile,service,docker-compose
just results in:
$ starter -g dockerfile,service,docker-compose
flag provided but not defined: -g
Usage of starter:
-branch string
template branch in github (default "master")
-e string
set project environment (default "production")
-overwrite
overwrite existing files
-p string
project path
-templates string
location of the templates directory
-y do not prompt user
Next tried running just starter
... get the following output:
$ starter
Cloud 66 Starter ~ (c) 2016 Cloud 66
Checking templates in /Users/nnn/.starter
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
Local templates are up to date
Detecting framework for the project at /Users/nnn/projects/project_name
Found ruby application
Enter ruby version: [latest]
----> Found config/database.yml
Found postgresql, confirm? [Y/n] Y
Found redis, confirm? [Y/n] Y
Add any other databases? [y/N] N
----> Analyzing dependencies
This command will be run after each build: '/bin/sh -c "RAILS_ENV=_env:RAILS_ENV bundle exec rake db:schema:load"', confirm? [Y/n] Y
This command will be run after each deployment: '/bin/sh -c "RAILS_ENV=_env:RAILS_ENV bundle exec rake db:migrate"', confirm? [Y/n] Y
----> Writing Dockerfile...
----> Writing service.yml...
Failed to write service.yml due to: template: service.yml.template:29:6: executing "service.yml.template" at <.Name>: can't evaluate field Name in type string
Trying to install Starter 1.4.3 on a Windows 10 machine. I downloaded the latest .exe and ran it, but that seemed to only install the template files to '.starter', and I wasn't able to use the 'starter' command in PowerShell even after a restart, so I downloaded the 1.4.3 source code and tried to build with docker-compose up
, but it's failing on a dependency I believe. Here's the CLI output:
PS C:\bin\starter-1.4.3> docker-compose up
WARNING: The PWD variable is not set. Defaulting to a blank string.
Building starter
Step 1/11 : FROM golang:1.7
---> 225948c9a8b1
Step 2/11 : MAINTAINER Cloud 66
---> Using cache
---> b4a5b8751a8c
Step 3/11 : RUN go get github.com/mitchellh/gox
---> Using cache
---> 9054a2705a1c
Step 4/11 : RUN go get -u github.com/kardianos/govendor
---> Using cache
---> e97a197e948d
Step 5/11 : RUN go get github.com/tools/godep
---> Using cache
---> 53c0e877e4e8
Step 6/11 : RUN go get github.com/onsi/ginkgo/ginkgo
---> Running in 91d38e331088
package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname)
ERROR: Service 'starter' failed to build : The command '/bin/sh -c go get github.com/onsi/ginkgo/ginkgo' returned a non-zero code: 1
Any idea how to fix this so I can successfully build and use Starter? Appreciate the help and the open source tech!
"Starter is an open-source command line tool to generate a Dockerfile and a service.yml file from arbitrary source code."
Sounds great! This is just what I was looking for when I found your app!
I have a Python project that already has a requirements.txt file, a setup.py and setup.cfg files. Environment is in Anaconda, on Ubuntu 18.04.
Installed via
$ sudo cp linux_amd64_1.4.3 /usr/local/bin/starter
$ sudo chmod a+x /usr/local/bin/starter
Running inside my project directory yields...
$ cd [my project]
$ starter -g dockerfile,service,docker-compose
Starter (c) 2019 Cloud66 Inc.
Checking templates in /home/shawley/.starter
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
No local templates found. Downloading now.
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/templates.json
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/node.dockerfile.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/python.dockerfile.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/ruby.dockerfile.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/php.dockerfile.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/service.yml.template
----> Downloading from https://raw.githubusercontent.com/cloud66/starter/master/templates/docker-compose.yml.template
Local templates are up to date
Detecting framework for the project at /home/shawley/panotti
Failed to detect supported framework
...and that's all it says. What now? (What was it hoping to detect, and why did it fail?)
If you want to see the project, check here: https://github.com/drscotthawley/panotti
Current builds will use Webrick, which is extremely slow.
Adding thin
to Gemfile is one option, but requires touching users' code... I tried adding RUN bundle exec gem install thin
to Dockerfile after bundle install
but it still uses Webrick.
Using Passenger probably isn't great as it requires Nginx in the container as well.
if you got a old version say 1.0.1 with the templates installed and you upgrade to 1.0.2 the new templates are not downloaded, so no docker-compose.yml is generated.
I am using latest version of starter 1.0.2
and getting this error:
Failed to write docker-compose.yml due to: template: docker-compose.yml.template:19:6: executing "docker-compose.yml.template" at <.Name>: can't evaluate field Name in type string
This is very similar to #50 but with support for Kubernetes yaml file and generating Cloud 66 service.yml
. The syntax is:
$ starter --in my-kubes.yml --in-format kubernetes ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.