Compare commits

..

29 Commits

Author SHA1 Message Date
5e796f17d2 Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop 2020-09-16 08:14:22 +02:00
408fdf22a2 partitioning 2020-09-16 08:13:26 +02:00
f13e0b8555 partitioning 2020-09-16 08:04:25 +02:00
940a76698f add dependence to sql file and create eole-risotto-all package 2020-09-06 09:51:57 +02:00
9540ff6c8f remove sql file and dispatch it in risotto-*-sql packages 2020-09-06 09:48:32 +02:00
7becbca64e Changement de nom de table SQL + ajout des colonnes OSName/OSVersion/Compatibilities pour les AS 2020-09-05 16:38:05 +02:00
54c895f822 les servermodels ne sont plus associés à une source 2020-09-02 09:04:49 +02:00
f371c96ff3 release_name and release_distribution 2020-08-26 15:32:09 +02:00
0d938a2389 add infraserver table 2020-08-19 11:37:15 +02:00
1873722043 add infraserver table 2020-08-19 11:36:54 +02:00
2dce20e691 update dependencies 2020-08-12 14:08:20 +02:00
66f83826e0 update dependencies 2020-08-12 14:00:22 +02:00
2c9b78ee14 risotto-* => python3-risotto-* 2020-08-12 11:23:33 +02:00
ccd30b7ab5 Add dependencies previously installed from pypi 2020-08-12 09:00:36 +02:00
d7af784926 Merge branch 'develop' into dist/risotto/risotto-2.7.1/develop 2020-08-12 08:32:11 +02:00
80bcc8821f refactor import of seed files 2020-08-12 08:30:58 +02:00
71bbc42786 Merge branch 'develop' into dist/risotto/risotto-2.7.1/develop 2020-08-07 17:09:40 +02:00
a69d0f7386 fixer les permissions avant le démarrage de risotto 2020-08-07 17:09:22 +02:00
93db38dc7f Merge branch 'develop' into dist/risotto/risotto-2.7.1/develop 2020-08-05 17:11:47 +02:00
2ce388eaf9 comment unuse column in applicationservice table 2020-08-05 17:11:30 +02:00
138d6d9e06 Delete changelog 2020-08-05 09:20:36 +02:00
68add009e2 Fixes syntax error in debian/control 2020-08-05 09:08:17 +02:00
761c112ad4 Temporary dependencies 2020-08-05 08:57:23 +02:00
a5a5ca875b package number in changelog 2020-07-22 16:48:04 +02:00
73ec33377c Merge branch 'master' into dist/eole/2.7.1/master 2020-07-03 09:22:18 +02:00
7cc19606c1 Use postgresql template0 as database template 2020-06-30 10:39:48 +02:00
ad7b3dcfd8 Upgrade specification of applicationservice 2020-04-09 16:06:55 +02:00
34bd8c648c Merge branch 'master' into dist/eole/2.7.1/master 2020-04-09 10:13:27 +02:00
dc9454bc75 add pythonpath to use good tiramisu's version 2020-04-09 09:09:26 +02:00
8 changed files with 78 additions and 162 deletions

View File

@ -1,148 +0,0 @@
-- Deployment
CREATE TABLE Deployment (
DeploymentId SERIAL PRIMARY KEY,
ProviderType VARCHAR(255) NOT NULL,
TargetType VARCHAR(255) NOT NULL,
TargetName VARCHAR(255) NOT NULL,
FactoryCluster VARCHAR(255),
FactoryNodeName VARCHAR(255),
CPU INTEGER,
VCPU INTEGER,
Memory INTEGER,
Labels VARCHAR(255) [] DEFAULT '{}',
UNIQUE (TargetType, TargetName)
);
CREATE INDEX Deployment_FactoryNodeName_index ON Deployment(FactoryNodeName);
-- Cluster
CREATE TABLE FactoryCluster (
ClusterId SERIAL PRIMARY KEY,
ClusterName VARCHAR(255) NOT NULL UNIQUE,
ClusterDescription VARCHAR(255) NOT NULL,
VirtualIp VARCHAR(15) NOT NULL,
ZoneName VARCHAR(255) NOT NULL
);
-- Node in Cluster
CREATE TABLE FactoryClusterNode (
ClusterNodeId SERIAL PRIMARY KEY,
ClusterId INTEGER NOT NULL,
ServerName VARCHAR(255) NOT NULL UNIQUE,
FOREIGN KEY (ClusterId) REFERENCES FactoryCluster(ClusterId)
);
CREATE INDEX FactoryClusterNode_ServerName_index ON FactoryClusterNode(ServerName);
-- Site
CREATE TABLE Site (
SiteId SERIAL PRIMARY KEY,
SiteName VARCHAR(255) NOT NULL UNIQUE,
SiteDescription VARCHAR(255) NOT NULL
);
-- Zone
CREATE TABLE Zone (
ZoneId SERIAL PRIMARY KEY,
ZoneName VARCHAR(255) NOT NULL UNIQUE,
ZoneDescription VARCHAR(255) NOT NULL,
SitesName VARCHAR(255) [] NOT NULL
);
-- Server
CREATE TABLE Server (
ServerId SERIAL PRIMARY KEY,
ServerName VARCHAR(255) NOT NULL UNIQUE,
ServerDescription VARCHAR(255) NOT NULL,
ServerServermodelName VARCHAR(255) NOT NULL,
ReleaseDistribution VARCHAR(255) NOT NULL,
SiteName VARCHAR(255) NOT NULL,
ZonesName VARCHAR(255) [] NOT NULL,
ZonesIP VARCHAR(255) [] NOT NULL
);
-- Source
CREATE TABLE Source (
SourceId SERIAL PRIMARY KEY,
SourceName VARCHAR(255) NOT NULL UNIQUE,
SourceURL TEXT
);
-- Release
CREATE TABLE Release (
ReleaseId SERIAL PRIMARY KEY,
ReleaseName VARCHAR(255) NOT NULL,
ReleaseSourceId INTEGER NOT NULL,
ReleaseDistribution VARCHAR(20) CONSTRAINT releasedistribution_choice CHECK (ReleaseDistribution IN ('last', 'n-1', 'n-2')),
UNIQUE (ReleaseName, ReleaseSourceId),
UNIQUE (ReleaseDistribution, ReleaseSourceId),
FOREIGN KEY (ReleaseSourceId) REFERENCES Source(SourceId)
);
-- Servermodel
CREATE TABLE Servermodel (
ServermodelId SERIAL PRIMARY KEY,
ServermodelName VARCHAR(255) NOT NULL,
ServermodelDescription VARCHAR(255) NOT NULL,
Osname VARCHAR(255),
Osversion VARCHAR(255),
ISO VARCHAR(255),
ServermodelParents VARCHAR(255) [] DEFAULT '{}',
SourceName VARCHAR(255) NOT NULL,
ReleaseDistribution VARCHAR(255) NOT NULL,
ServermodelApplicationserviceId INTEGER NOT NULL,
UNIQUE (ServermodelName, SourceName, ReleaseDistribution)
);
CREATE INDEX ServermodelApplicationserviceId_index ON Servermodel (ServermodelApplicationserviceId);
-- Applicationservice
CREATE TABLE Applicationservice (
ApplicationserviceId SERIAL PRIMARY KEY,
ApplicationserviceName VARCHAR(255) NOT NULL,
ApplicationserviceDescription VARCHAR(255) NOT NULL,
ApplicationserviceReleaseId INTEGER NOT NULL,
OS JSON,
UNIQUE (ApplicationserviceName, ApplicationserviceReleaseId)
);
CREATE TABLE ApplicationserviceDependency (
ApplicationserviceId INTEGER NOT NULL,
ApplicationserviceDependencyId INTEGER NOT NULL,
UNIQUE(ApplicationserviceId, ApplicationserviceDependencyId),
FOREIGN KEY (ApplicationserviceId) REFERENCES Applicationservice(ApplicationserviceId),
FOREIGN KEY (ApplicationserviceDependencyId) REFERENCES Applicationservice(ApplicationserviceId)
);
-- Log
CREATE TABLE log(
Msg VARCHAR(255) NOT NULL,
Level VARCHAR(10) NOT NULL,
Path VARCHAR(255),
Username VARCHAR(100) NOT NULL,
Data JSON,
Date timestamp DEFAULT current_timestamp
);
-- User, Role and ACL
CREATE TABLE RisottoUser (
UserId SERIAL PRIMARY KEY,
UserLogin VARCHAR(100) NOT NULL UNIQUE,
UserName VARCHAR(100) NOT NULL,
UserSurname VARCHAR(100) NOT NULL
);
CREATE TABLE UserRole (
RoleId SERIAL PRIMARY KEY,
RoleUserId INTEGER NOT NULL,
RoleName VARCHAR(255) NOT NULL,
RoleAttribute VARCHAR(255),
RoleAttributeValue VARCHAR(255),
FOREIGN KEY (RoleUserId) REFERENCES RisottoUser(UserId)
);
CREATE TABLE URI (
URIId SERIAL PRIMARY KEY,
URIName VARCHAR(255) NOT NULL UNIQUE
);
CREATE TABLE RoleURI (
RoleName VARCHAR(255) NOT NULL,
URIId INTEGER NOT NULL,
FOREIGN KEY (URIId) REFERENCES URI(URIId),
PRIMARY KEY (RoleName, URIId)
);

5
debian/changelog vendored
View File

@ -1,5 +0,0 @@
eole-risotto (0.1) unstable; urgency=medium
* Création du paquet
-- Cadoles <contact@cadoles.com> Thu, 02 Apr 2020 10:43:03 +0200

25
debian/control vendored
View File

@ -10,9 +10,32 @@ Vcs-Browser: https://forge.cadoles.com/Infra/risotto
Package: eole-risotto
Architecture: any
Depends: ${misc:Depends},
Depends: ${misc:Depends},
eole-db,
eole-postgresql,
risotto-user-sql,
risotto-setting-sql,
risotto-provider-sql,
risotto-infra-sql,
risotto-message,
risotto
Description: configuration pour lintégration de risotto dans EOLE
.
Pour toute information complémentaire, veuillez vous rendre sur le
site du projet.
Package: eole-risotto-all
Architecture: any
Depends: ${misc:Depends},
eole-risotto,
python3-risotto-user,
python3-risotto-setting,
python3-risotto-provider,
python3-risotto-infra,
cadoles-risotto-seed,
cucchiaiata,
eole-risotto
Description: configuration pour lintégration de risotto dans EOLE
.
Pour toute information complémentaire, veuillez vous rendre sur le
site du projet.

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<creole>
<variables>
<family name='système'>
<!-- We need to recalculate the variables -->
<variable name='eole_lv_names' redefine='True' remove_check='True' />
<variable name='eole_lv_standard_extends' redefine='True' remove_check='True' />
</family>
</variables>
<constraints>
<!-- Default AmonEcole* logical volumes -->
<auto name='calc_multi_val' target='eole_lv_names'>
<param>root</param>
<param>tmp</param>
<param>var</param>
<param>var+spool</param>
<param>var+log</param>
<param>home</param>
</auto>
<!-- Default AmonEcole* logical volumes extension: 100% /home -->
<auto name='calc_multi_val' target='eole_lv_standard_extends'>
<param type='number'>0</param>
<param type='number'>0</param>
<param type='number'>0</param>
<param type='number'>0</param>
<param type='number'>0</param>
<param type='number'>100</param>
</auto>
</constraints>
<help/>
</creole>
<!-- vim: ts=4 sw=4 expandtab
-->

View File

@ -2,6 +2,8 @@
set -e
systemctl start postgresql.service
psql -Upostgres -c "grant all on all tables in schema public to risotto" risotto
psql -Upostgres -c "grant all on all sequences in schema public to risotto" risotto
psql -Upostgres -c "grant all on all functions in schema public to risotto" risotto
@ -9,4 +11,6 @@ psql -Upostgres -c "grant all on all tables in schema public to tiramisu" tirami
psql -Upostgres -c "grant all on all sequences in schema public to tiramisu" tiramisu
psql -Upostgres -c "grant all on all functions in schema public to tiramisu" tiramisu
systemctl stop postgresql.service
exit 0

View File

@ -12,3 +12,4 @@ DB_ADDRESS=%%getVar('risotto_db_address')
MESSAGE_PATH=%%getVar('risotto_messages_dir')
CACHE_ROOT_PATH=%%getVar('risotto_cache_dir')
SRV_SEED_PATH=%%getVar('risotto_seed_dir')
PYTHONPATH="/usr/lib/python3.6/dist-packages:$PYTHONPATH"

View File

@ -1,17 +1,23 @@
%from os import listdir
%set %%dbname = %%getVar('risotto_main_dbname')
---
dbuser: %%getVar('risotto_db_user')
dbuser_options:
- LOGIN
- LOGIN
privileges:
%%{dbname}.public.*: 'ALL'
%%{dbname}.public: 'ALL'
%%{dbname}: 'ALL'
%%{dbname}.public.*: 'ALL'
%%{dbname}.public: 'ALL'
%%{dbname}: 'ALL'
dbhost: %%getVar('risotto_db_address')
dbport: 5432
dbtype: postgres
dbname: %%dbname
template: 'postgres'
sqlscripts: ['/usr/share/eole/db/eole-risotto/gen/create_tables.sql']
template: 'template0'
sqlscripts:
%for %%file in %%listdir('/usr/share/eole/db/eole-risotto/gen/')
%if %%file.endswith('.sql')
- /usr/share/eole/db/eole-risotto/gen/%%file
%end if
%end for
pwd_files:
- {'file': '/etc/risotto/risotto.conf', 'pattern': 'RISOTTO_DB_PASSWORD='}
- {'file': '/etc/risotto/risotto.conf', 'pattern': 'RISOTTO_DB_PASSWORD='}

View File

@ -11,7 +11,7 @@ dbhost: %%getVar('risotto_db_address')
dbport: 5432
dbtype: postgres
dbname: %%getVar('risotto_tiramisu_dbname')
template: 'postgres'
template: 'template0'
pwd_files:
- {'file': '/etc/risotto/risotto.conf', 'pattern': 'TIRAMISU_DB_PASSWORD='}