Help:Getting Started: Difference between revisions

From Wikitech
Content deleted Content added
Gifti (talk | contribs)
Remove content duplicated elsewhere and make this page mostly navigational
Β 
(140 intermediate revisions by 45 users not shown)
Line 1: Line 1:
{{DocumentationPage}}
Welcome to Wikimedia Labs! Wikimedia Labs is a virtualization cluster and hosts various virtual machines (called instances) using [http://www.openstack.org/software/openstack-compute/ OpenStack Compute]. This is slightly different from your normal servers that you <tt>ssh</tt> to (i.e. Toolserver), as virtual machines do not exist physically, but reside inside a much bigger machine called the host machine.


== Set up your accounts ==
If you are unsure about what to do next after visiting this site, this page will walk you through getting you started on Wikimedia Labs and start your development work!


{{Account_setup}}
== Create a User Account ==
If you haven’t done so, [https://labsconsole.wikimedia.org/w/index.php?title=Special:UserLogin&returnto=Help%3AGetting+Started&type=signup create a user account] for yourself. This account allows you to :
* Commit code to Wikimedia’s [http://en.wikipedia.org/wiki/Git_(software) Git] repositories via [http://en.wikipedia.org/wiki/Gerrit_(software) Gerrit]
* Work with Wikimedia Labs projects


== Request Shell Access ==
== Get started with Toolforge ==
Shell access to virtual machines (vm) on Wikimedia Labs gives you the ability to create new vm instances, configure them, and manage them depending on the [[Help:Access#Rights|Access Rights]] granted to your account and the projects you have been assigned. Shell access is granted by [[Special:ListUsers/cloudadmin|a Cloud Admin]]; please submit a request here:


Follow the steps on [[Help:Toolforge/Quickstart]].
* {{#formlink:form=Shell Access Request|link text=Request Shell Access}}<br/>''nb: while not necessary, if you know that you want to become part of a project or create a new project, indicate that in your request''.


== Get started with Cloud VPS Projects ==
You can see the list of outstanding and completed requests here:


Follow the steps on [[Portal:Cloud VPS]].
* {{#ask:[[Category:Shell Access Requests]][[Is Completed::false]]|?Shell Justification|?Modification date|format=broadtable|sort=Modification date|order=asc|headers=show|searchlabel=Outstanding Requests|limit=0|default=(No outstanding requests)}}
* {{#ask:[[Category:Shell Access Requests]][[Is Completed::true]]|?Shell Justification|?Modification date|format=broadtable|sort=Modification date|order=asc|headers=show|searchlabel=Completed Requests|limit=0|default=(No completed requests)}}


== Upload your SSH key ==
== Get started with Gerrit ==
Wikimedia Labs and [https://gerrit.wikimedia.org Wikimedia Code Review] use an [http://en.wikipedia.org/wiki/Secure_Shell SSH key] to authenticate you. If you already have an SSH key you can use that one, or [https://www.mediawiki.org/wiki/Git/Tutorial#Set_Up_SSH_Keys_in_Gerrit generate a new one] specifically for Wikimedia use; the default public key name generated by [http://en.wikipedia.org/wiki/Ssh-keygen ssh-keygen] is typically <tt>id_rsa.pub</tt>.


=== to Wikimedia Labs ===
Gerrit is Wikimedia's code review system.
[[Special:NovaKey|Upload your public key]] to Wikimedia Labs.


Once you have [[Help:Create_a_Wikimedia_developer_account|created your Wikimedia account and Wikimedia developer account]], including your UNIX shell username, follow the instructions in the [https://www.mediawiki.org/wiki/Gerrit/Tutorial#Set_Up_SSH_Keys_in_Gerrit Gerrit tutorial] to get started.
=== to Wikimedia Code Review ===
Upload your public key to [https://gerrit.wikimedia.org Wikimedia Code Review].
# β€œSign In” with your Wikimedia Developer Account
# Click the β€œSettings” link at the top right hand corner of the page
# Click on the β€œSSH Public Keys” tab on the left menu
# Click on β€œAdd Key ...” to upload your public key


{{:Help:Cloud Services communication}}
== Projects ==
=== Join Projects ===
In order to work on Wikimedia Labs projects you need to be assigned to them. By default, you have access to the [[Nova Resource:Bastion|bastion]] project so that you can view all the other instances in Wikimedia Labs, however, you need to be assigned to a project in order to work with its instances.


[[Category:Cloud Services]]
* [[:Special:Ask/-5B-5BResource-20Type::project-5D-5D/-3F/-3FMember/-3FDescription/mainlabel%3D-2D|Contact the current project owners]] for access rights or see the left sub-menu on this page ''β€œLabs : List Projects”''.
* Once you are in a project, you can [[#Access Project Instances|Access Project Instances]].

=== Create Projects ===
If you need to create a new project for your development work, either drop by [[Help:IRC|our IRC channel]] (#wikimedia-labs on Freenode) to ask for it, email the [[mail:labs-l|labs-l mailing list]] or place your request {{#formlink:form=New Project Request|link text=here}}.
* To create instances within a project, you'll need to have a sysadmin on the project, or have an admin add you to the sysadmin role for that project. In a project you can create as many instances as you'd like. The default quota limit per-project is 10 instances, but we can increase that number as much as needed.

== Project Instances ==
=== Access Project Instances ===
After you have received [[#Request_Shell_Access|shell access]], been [[#Projects|added to or created a project]] and successfully [[#Upload_your_SSH_key|added your SSH key]] to Wikimedia Labs and Wikimedia Code Review, read the [[Help:Access]] manual.

In short, accessing your project instances involves using either [[Help:Access#Using_agent_forwarding|Agent Forwarding]], or the [[Help:Access#Using_ProxyCommand_ssh_option|ProxyCommand ssh option]] ( ''requires ssh >= 5.4'' ) to connect to your instance.

==== Using Agent Forwarding ====
'''from your local computer'''
eval `ssh-agent`
ssh-add ~/.ssh/your_key_file_for_labs
ssh -A <username>@bastion.wmflabs.org
#once in bastion
ssh <instancename>.pmtpa.wmflabs
#or
ssh <instancename>

==== Using ProxyCommand ====
Generally, using the ProxyCommand ssh option would allow you to directly connect to your instance, skipping the portion about having to login to the bastion host and then logging in to your instance. If you have followed the steps given to set up the ProxyCommand ssh option, then this is the general command to use to login to your instance in the Terminal:<br/>
'''from your local computer'''
ssh <instancename>.pmtpa.wmflabs

The instance name is given in the "Instance name" column in [[Special:NovaInstance]], or the first-left column of that page. Logging in to the instance is just like logging in to another computer. You have complete root access to it, and you can install relevant programs that benefit your project's purpose, and do work that comply with our Terms of Use.

You can also make [[Resource query examples|queries]] for nova resources in order to get more information about current project instances; currently only Nova instances have semantic properties enabled.

=== Create Project Instances ===
see [[Help:Instances]]

=== Configure Project Instances ===
see [[Help:Instances#Configuring_Instances]]

== Log your actions ==
Wikimedia Labs provides a [[Server Admin Log]] which all users can log their actions on their projects. You can add a log entry in the #wikimedia-labs channel on Freenode by using the following command:
!log <projectname> <message>
It's best to log all changes to the instances in your project. Doing so makes it easier for others to follow your progress, and to more easily join your project and help out.

== Read the documentation and rules ==
* [[Help:Contents]] - help table of contents
* [[Help:Access]] - contains information on how to access lab instances
* [[Help:Rules]] - rules you need to follow when using Wikimedia Labs

== Git committers ==
If you are just simply getting an account for committing into Gerrit, read some detailed documentation about it
* [[Help:Git]] - (somewhat) complete documentation of using Gerrit
* [[mw:Git/Workflow|Git workflow]] - A lengthy page detailing all aspects of committing into Gerrit and using it.

== Further help ==
If you encounter any problems, drop by our [[Help:IRC|IRC channel]] at [irc://irc.freenode.net/#wikimedia-labs #wikimedia-labs] on [[:en:Freenode|Freenode]]. Happy hacking!


[[Category:Documentation]]

Latest revision as of 20:14, 22 September 2023

Set up your accounts

To access Toolforge, Cloud VPS, or other Wikimedia developer tools, you need the following two types of accounts:

Account Type Description Where to sign up
Wikimedia account Also known as "Wikimedia single user login (SUL)" account. Allows you to log into general wikis like Wikipedia, MediaWiki, and MetaWiki. Create Wikimedia account
Wikimedia developer account Username (also called LDAP username) is used to log in on Wikitech (this wiki), Gerrit, and the Toolforge admin console. In GitLab it is your displayed name, so you may want it to be your full name. You will not be able to change this later!

Shell username is used to log into Toolforge, other Wikimedia VPS or Wikimedia production hosts using SSH.

Create Wikimedia developer account

Get started with Toolforge

Follow the steps on Help:Toolforge/Quickstart.

Get started with Cloud VPS Projects

Follow the steps on Portal:Cloud VPS.

Get started with Gerrit

Gerrit is Wikimedia's code review system.

Once you have created your Wikimedia account and Wikimedia developer account, including your UNIX shell username, follow the instructions in the Gerrit tutorial to get started.

Communication and support

Support and administration of the WMCS resources is provided by the Wikimedia Foundation Cloud Services team and Wikimedia movement volunteers. Please reach out with questions and join the conversation:

Discuss and receive general support
Stay aware of critical changes and plans
Track work tasks and report bugs

Use a subproject of the #Cloud-Services Phabricator project to track confirmed bug reports and feature requests about the Cloud Services infrastructure itself

Read stories and WMCS blog posts

Read the Cloud Services Blog (for the broader Wikimedia movement, see the Wikimedia Technical Blog)