Skip to content

Commit

Permalink
Merge pull request #36 from artefactory/dev
Browse files Browse the repository at this point in the history
0.0.3
  • Loading branch information
griseau authored Oct 15, 2020
2 parents b66d2e6 + 2857ac6 commit 77085e6
Show file tree
Hide file tree
Showing 40 changed files with 920 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#terraform
.terraform
*.tfstate
*.tfstate.backup
*.tfvars
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Make sure you have checked _all_ steps below.

### Issue

- [ ] My PR addresses the following Issue (If an issue exists in JIRA or Github)

### Description

- [ ] Here are some details about my PR, including example of usage.

### Licence

- [ ] My PR adds the needed licence header to every added file:

### Commits

- [ ] I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body explains "what" and "why", not "how"

### Documentation

- [ ] In case of new functionality, my PR adds documentation that describes how to use it.
- All the public functions and the classes in the PR contain docstrings that explain what it does
16 changes: 16 additions & 0 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: gitleaks

on:
push:
pull_request:
branches:
- master
- dev

jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: gitleaks-action
uses: zricethezav/gitleaks-action@master
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing to one-click-mlflow
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

## We Develop with Github
We use github to host code, to track issues and feature requests, as well as accept pull requests.

## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:

1. Fork the repo and create your branch from `master`.
2. If needed, update the documentation.
3. Make sure your code works.
4. Don't forget to add licence header to every file if you added any.
5. Issue that pull request!

## Report bugs using Github's [issues](https://github.com/briandk/transcriptase-atom/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](); it's that easy!


**Great Bug Reports** :

Follow the GitHub issue template and give as many informations as you can.

## License

By contributing, you agree that your contributions will be licensed under its GNU LESSER GENERAL PUBLIC LICENSE.
23 changes: 23 additions & 0 deletions IaC/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
terraform {
backend "gcs" {
}
Expand Down Expand Up @@ -35,3 +52,9 @@ module "mlflow" {
network_self_link = module.network.network_self_link
network_short_name = module.network.network_short_name
}

module "log_pusher" {
source = "./modules/mlflow/log_pusher"
project_id = var.project_id
depends_on = [module.mlflow]
}
18 changes: 18 additions & 0 deletions IaC/modules/mlflow/artifacts/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
resource "google_storage_bucket" "this" {
name = var.bucket_name
location = var.bucket_location
Expand All @@ -13,4 +30,5 @@ resource "google_storage_bucket" "this" {
type = "Delete"
}
}
uniform_bucket_level_access = var.storage_uniform
}
17 changes: 17 additions & 0 deletions IaC/modules/mlflow/artifacts/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
output "url" {
description = "gcs uri"
value = google_storage_bucket.this.url
Expand Down
22 changes: 22 additions & 0 deletions IaC/modules/mlflow/artifacts/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
variable "bucket_name" {
description = "Name of the bucket."
type = string
Expand Down Expand Up @@ -26,3 +43,8 @@ variable "module_depends_on" {
type = any
default = null
}
variable "storage_uniform" {
type = bool
description = "Wether or not uniform level acces is to be activated for the buckets"
default = true
}
17 changes: 17 additions & 0 deletions IaC/modules/mlflow/database/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
resource "random_id" "db_name_suffix" {
byte_length = 5
}
Expand Down
17 changes: 17 additions & 0 deletions IaC/modules/mlflow/database/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
output "instance_connection_name" {
description = "Connection string used to connect to the instance"
value = google_sql_database_instance.this_instance.connection_name
Expand Down
17 changes: 17 additions & 0 deletions IaC/modules/mlflow/database/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
variable "instance_prefix" {
type = string
description = "Name of the database instance you want to deploy"
Expand Down
33 changes: 33 additions & 0 deletions IaC/modules/mlflow/log_pusher/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
resource "google_service_account" "log_pusher" {
account_id = "mlflow-log-pusher"
display_name = "mlflow log pusher"
}

resource "google_project_iam_member" "log_pusher_iap" {
project = var.project_id
role = "roles/iap.httpsResourceAccessor"
member = "serviceAccount:${google_service_account.log_pusher.email}"
}

resource "google_project_iam_member" "log_pusher_storage" {
project = var.project_id
role = "roles/storage.objectAdmin"
member = "serviceAccount:${google_service_account.log_pusher.email}"
}
20 changes: 20 additions & 0 deletions IaC/modules/mlflow/log_pusher/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
variable "project_id" {
type = string
}
17 changes: 17 additions & 0 deletions IaC/modules/mlflow/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module "artifacts" {
source = "./artifacts"
bucket_name = var.artifacts_bucket_name
Expand Down
Loading

0 comments on commit 77085e6

Please sign in to comment.