This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:ione-cloud/ione
- Loading branch information
Showing
33 changed files
with
483 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*.md | ||
LICENSE | ||
*.yml | ||
ui | ||
modules | ||
*.service | ||
nginx.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected].0 | ||
- uses: actions/[email protected].1 | ||
|
||
- name: Dependencies | ||
run: npm install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ jobs: | |
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected].0 | ||
- uses: actions/[email protected].1 | ||
|
||
- name: Dependencies | ||
run: npm install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Create and publish a Docker images | ||
|
||
on: | ||
push: | ||
branches: ['master', 'release'] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
ione: | ||
runs-on: ubuntu-latest | ||
environment: ione | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ${{ env.REGISTRY }}/support-pl/ione | ||
|
||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
ione-admin: | ||
runs-on: ubuntu-latest | ||
environment: ione-admin | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ${{ env.REGISTRY }}/support-pl/ione-admin | ||
|
||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: ui | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
- uses: actions/[email protected] | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1.81.0 | ||
uses: ruby/setup-ruby@v1.82.0 | ||
with: | ||
ruby-version: 2.5 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM ruby:2.5.5-alpine | ||
|
||
ADD . /ione | ||
WORKDIR /ione | ||
|
||
RUN apk update && apk add --virtual build-dependencies build-base | ||
RUN apk add augeas-dev mariadb-dev | ||
RUN bundle install | ||
|
||
ENTRYPOINT ["sh", "command.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'augeas' | ||
gem 'colorize' | ||
gem 'file-tail' | ||
gem 'mysql2' | ||
gem 'net-sftp', '3.0.0' | ||
gem 'net-ssh', '6.1.0' | ||
gem 'nori' | ||
gem 'opennebula' | ||
gem 'sequel' | ||
gem 'sinatra-contrib' | ||
gem 'sinatra-websocket' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
rake hooks_tp | ||
ruby /ione/ione_server.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
require 'core/load_oned_conf.rb' | ||
require 'core/connect_db.rb' | ||
if ENV["ALPINE"] == 'true' then | ||
require 'core/connect_db_env.rb' | ||
else | ||
require 'core/load_oned_conf.rb' | ||
require 'core/connect_db.rb' | ||
end | ||
require 'core/settings.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
db_backend = ENV['DB_BACKEND'] # mysql or postgresql | ||
case db_backend | ||
when "mysql" | ||
adapter = :mysql2 | ||
when "postgresql" | ||
adapter = :postgres | ||
else | ||
STDERR.puts "OneDB backend(#{db_backend}) is not supported, exiting..." | ||
exit 1 | ||
end | ||
|
||
ops = {} | ||
ops[:host] = ENV['DB_HOST'] | ||
ops[:user] = ENV['DB_USER'] | ||
ops[:password] = ENV['DB_PASSWORD'] | ||
ops[:database] = ENV['DB_DATABASE'] | ||
|
||
ops.merge! adapter: adapter | ||
|
||
require 'sequel' | ||
begin | ||
print "Connecting to DB... " | ||
$db = Sequel.connect(**ops) | ||
rescue => e | ||
puts "Error connecting to DB: #{e.message}" | ||
puts "Retrying in 60 sec" | ||
sleep 60 | ||
puts "Retrying..." | ||
retry | ||
end | ||
puts "Connected" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: '3.7' | ||
services: | ||
ione: | ||
image: ghcr.io/support-pl/ione:latest | ||
network_mode: host | ||
environment: | ||
ALPINE: "true" | ||
IONE_LOCATION: /ione | ||
ONE_LOCATION: /ione/sys | ||
LOG_LOCATION: /log | ||
ONE_CREDENTIALS: "oneadmin:password" | ||
DB_BACKEND: mysql | ||
DB_HOST: localhost | ||
DB_USER: oneadmin | ||
DB_PASSWORD: DBpassword | ||
DB_DATABASE: opennebula | ||
ONE_ENDPOINT: "http://localhost:2633/RPC2" | ||
ports: | ||
- 8009:8009 | ||
volumes: | ||
- ./sys:/ione/sys | ||
- /var/log/one:/log | ||
ione-admin: | ||
image: ghcr.io/support-pl/ione-admin:latest | ||
network_mode: host | ||
environment: | ||
VUE_APP_IONE_API_BASE_URL: http://localhost:8009 | ||
ports: | ||
- 5000:5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.