You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Frederik Højlund 0ad45eb173 Initial github commit 2 years ago
gradle/wrapper Gradle files, Project scope testing 2 years ago
specs Added ucloud models for deserialization. Openapi generator can be used to generate some models but modifications needed to be made, WIP 2 years ago
src Initial github commit 2 years ago
.gitignore Initial commit, template code 2 years ago
Dockerfile dockerfile and stuff 2 years ago
README.md Updated readme 2 years ago
build.gradle.kts Initial github commit 2 years ago
docker-compose.yml Save templates in database. Docker Compose file for postgress db testing. Tests. Database migrations 2 years ago
gradlew Gradle files, Project scope testing 2 years ago
gradlew.bat Gradle files, Project scope testing 2 years ago

README.md

OpenStackGatewayPOC

Gateway for routing traffic to openstack

Microstack Openstack Setup

First, install microstack:

sudo snap install microstack --beta --devmode
sudo microstack init --auto --control

User setup

Create user:
microstack.openstack user create ucloud --password 1234

Create project:
microstack.openstack project create ucloud

Create role:
microstack.openstack role create ucloud

To assign a user to a project, you must assign the role to a user-project pair. To do this, you need the user, role, and project IDs. List users and note the user ID you want to assign to the role:
microstack.openstack user list

List role IDs and note the role ID you want to assign:
microstack.openstack role list

List projects and note the project ID you want to assign to the role: Assign a role to a user-project pair:
microstack.openstack role add --user ucloud --project PROJECT_ID ucloud

Model generation.

./gradlew openApiGenerate

can be used to generate models Not everything works however. I needed to use the bulkrequest model from ucloud as well as some modifications to them. This will need to be updated in the future. It uses the spec definition from the specs folder.

Datebase migrations

./gradlew diffChangeLog

can be used to generate database migrations. They do not merge very good with existing migrations. Also, for some reason, the migration always contain a change to create the hibernate sequence. When generating new migrations this will need to be removed. The code should be moved to a seperate file in the "changes" folder and included in the changelog-master. This is a bit dirty, but it works for now. The alternative is to define migrations manually.