Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scaleway instances template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
systemes-dinformation
alpha
pocs
Cloud Machinist
cloud machinist templates
scaleway instances template
Commits
40645930
Commit
40645930
authored
2 years ago
by
Nathan Rodet
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation
parent
ec495833
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Develop
Pipeline
#50983
failed
2 years ago
Stage: prepare
Stage: validate
Stage: build
Stage: deploy
Stage: destroy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+15
-15
15 additions, 15 deletions
README.md
with
15 additions
and
15 deletions
README.md
+
15
−
15
View file @
40645930
# Scaleway Instances Template - Quickstart
# Scaleway Instances Template - Quickstart
#
# How does it work ?
# How does it work ?
The template will provision several resources (including your instances) to the Scaleway cloud provider using Terraform and Gitlab CI.
The template will provision several resources (including your instances) to the Scaleway cloud provider using Terraform and Gitlab CI.
After provisioning, configuration of the instances and deployment of the services (Atrium and TTYD) will be done using Cloud-init and bash scripts.
After provisioning, configuration of the instances and deployment of the services (Atrium and TTYD) will be done using Cloud-init and bash scripts.
> All your information must be stored in Gitlab and passed as variable to Terraform.
> All your information must be stored in Gitlab and passed as variable to Terraform.
##
#
How the deployment is managed ?
## How the deployment is managed ?
The whole project is managed by Gitlab using the Gitlab CI.
The whole project is managed by Gitlab using the Gitlab CI.
Launching the pipeline will start the deployment of your infrastructure in 3 steps.
Launching the pipeline will start the deployment of your infrastructure in 3 steps.
**Plan :**
**Plan :**
Terraform will perform a "fake deployment" and initialize everything he needs before deploying.
Terraform will perform a "fake deployment" and initialize everything he needs before deploying.
After performing, you will be able to see the plan of the future creation/modification/destruction in the log of the pipeline.
After performing, you will be able to see the plan of the future creation/modification/destruction in the log of the pipeline.
If the modification could lead to break changes and errors, you must not launch the next step of the pipeline.
If the modification could lead to break changes and errors, you must not launch the next step of the pipeline.
**Creation :**
**Creation :**
Terraform will be applying the exact changes you reviewed in the Plan step.
Terraform will be applying the exact changes you reviewed in the Plan step.
**Destruction :**
**Destruction :**
Terraform will destroy the resources he managed to create (or manually imported one).
Terraform will destroy the resources he managed to create (or manually imported one).
##
How can I use it ?
##How can I use it ?
##
#
Step 0 : Prerequisite
## Step 0 : Prerequisite
**On The Forge (Gitlab)**
, you must have or ask for the right to fork the repository.
**On The Forge (Gitlab)**
, you must have or ask for the right to fork the repository.
...
@@ -33,11 +33,11 @@ and create one for your project. Please make sure to add a description starting
...
@@ -33,11 +33,11 @@ and create one for your project. Please make sure to add a description starting
**The Certificate Authority (CA)**
Let's Encrypt needs an email. He will use it to send a notification before the certificate expires to proceed with
**The Certificate Authority (CA)**
Let's Encrypt needs an email. He will use it to send a notification before the certificate expires to proceed with
the renewal.
the renewal.
##
#
Step 1 : Getting your own repository
## Step 1 : Getting your own repository
Fork the project from
[
this repository
](
https://forge.grandlyon.com/systemes-dinformation/alpha/pocs/scaleway-instances-template
)
Fork the project from
[
this repository
](
https://forge.grandlyon.com/systemes-dinformation/alpha/pocs/scaleway-instances-template
)
##
#
Step 2 : Setting up the variables with credentials and others information
## Step 2 : Setting up the variables with credentials and others information
Go to the
`Settings`
menu,
`CI/CD`
and look for the
`Variables`
submenu.
Go to the
`Settings`
menu,
`CI/CD`
and look for the
`Variables`
submenu.
Once it's done, you will need to create the variable bellow :
Once it's done, you will need to create the variable bellow :
...
@@ -50,7 +50,7 @@ Once it's done, you will need to create the variable bellow :
...
@@ -50,7 +50,7 @@ Once it's done, you will need to create the variable bellow :
-
**TF_VAR_SCW_SECRET_KEY**
: Scaleway Secret Key.
-
**TF_VAR_SCW_SECRET_KEY**
: Scaleway Secret Key.
-
**TF_VAR_USER_PASSWORD**
: User password for accessing services and instances.
-
**TF_VAR_USER_PASSWORD**
: User password for accessing services and instances.
##
#
Step 3 : Every is set up, deployment is coming !
## Step 3 : Every is set up, deployment is coming !
Go the
`CI/CD`
menu and
`Pipelines`
.
Go the
`CI/CD`
menu and
`Pipelines`
.
From now, you will need to click on
`Run pipeline`
with your selected branch.
From now, you will need to click on
`Run pipeline`
with your selected branch.
...
@@ -63,7 +63,7 @@ on production infrastructure.
...
@@ -63,7 +63,7 @@ on production infrastructure.
Once plan is done and ok, click the
`Apply button`
to deploy the infrastructure. Please be sure to click the
`Destroy
Once plan is done and ok, click the
`Apply button`
to deploy the infrastructure. Please be sure to click the
`Destroy
button`
to destroy the infrastructure when you don't need it anymore.
button`
to destroy the infrastructure when you don't need it anymore.
##
#
Step 4 : Accessing your services
## Step 4 : Accessing your services
After deployment, each resource can be accessed though HTTPS, URL depends of the variable you defined before :
After deployment, each resource can be accessed though HTTPS, URL depends of the variable you defined before :
-
**TTYD :**
https://terminal-
<INSTANCE_COUNT>
.
<ENVIRONMENT>
-
<INSTANCE_COUNT>
.<PROJECT_DOMAIN/
-
**TTYD :**
https://terminal-
<INSTANCE_COUNT>
.
<ENVIRONMENT>
-
<INSTANCE_COUNT>
.<PROJECT_DOMAIN/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment